chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
service: don't hit an assert if a service unit changes type and we get a spurious...
[elogind.git]
/
src
/
core
/
load-fragment.c
diff --git
a/src/core/load-fragment.c
b/src/core/load-fragment.c
index 482d28b79587221dc2523532663350100f0b75be..1f3da70aca34337bdd20383b0bcbf77f7be2c1ce 100644
(file)
--- a/
src/core/load-fragment.c
+++ b/
src/core/load-fragment.c
@@
-1469,7
+1469,7
@@
int config_parse_unit_condition_path(
Unit *u = data;
bool trigger, negate;
Condition *c;
Unit *u = data;
bool trigger, negate;
Condition *c;
-
char *p
;
+
_cleanup_free_ char *p = NULL
;
assert(filename);
assert(lvalue);
assert(filename);
assert(lvalue);
@@
-1496,7
+1496,6
@@
int config_parse_unit_condition_path(
c = condition_new(cond, p, trigger, negate);
if (!c)
return -ENOMEM;
c = condition_new(cond, p, trigger, negate);
if (!c)
return -ENOMEM;
- free(p);
LIST_PREPEND(Condition, conditions, u->conditions, c);
return 0;
LIST_PREPEND(Condition, conditions, u->conditions, c);
return 0;
@@
-1516,7
+1515,7
@@
int config_parse_unit_condition_string(
Unit *u = data;
bool trigger, negate;
Condition *c;
Unit *u = data;
bool trigger, negate;
Condition *c;
-
char *s
;
+
_cleanup_free_ char *s = NULL
;
assert(filename);
assert(lvalue);
assert(filename);
assert(lvalue);
@@
-1538,7
+1537,6
@@
int config_parse_unit_condition_string(
c = condition_new(cond, s, trigger, negate);
if (!c)
return log_oom();
c = condition_new(cond, s, trigger, negate);
if (!c)
return log_oom();
- free(s);
LIST_PREPEND(Condition, conditions, u->conditions, c);
return 0;
LIST_PREPEND(Condition, conditions, u->conditions, c);
return 0;