chiark / gitweb /
sleep-config: fix double free
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Dec 2013 16:23:58 +0000 (11:23 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Dec 2013 18:00:57 +0000 (13:00 -0500)
commitdabeaa460d9fa01db645116775f53e3071977503
tree67680b2f880b45dd3e11eb8530ad91a85478d0f4
parentb8265d4f8e5cb05c1dacfd3b177c993ef2611723
sleep-config: fix double free

Before 34a3baa4d 'sleep-config: Dereference pointer before check for NULL'
oom conditions would not be detected properly. After that commit, a double
free was performed.

Rework the whole function to be easier to understand, and also replace
strv_split_nulstr with strv_new, since we know the strings anyway.
src/shared/sleep-config.c