[systemd-commits] src/core
Tom Gundersen
tomegun at kemper.freedesktop.org
Tue Sep 30 02:34:51 PDT 2014
src/core/execute.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit e63ff941eaa012ffd003e3791438c73b8a26227d
Author: Tom Gundersen <teg at jklm.no>
Date: Tue Sep 30 11:34:01 2014 +0200
core: execute - don't leak strv
diff --git a/src/core/execute.c b/src/core/execute.c
index 07ec7a2..8b9bb27 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -2567,8 +2567,8 @@ int exec_command_set(ExecCommand *c, const char *path, ...) {
}
int exec_command_append(ExecCommand *c, const char *path, ...) {
+ _cleanup_strv_free_ char **l = NULL;
va_list ap;
- char **l;
int r;
assert(c);
@@ -2582,10 +2582,8 @@ int exec_command_append(ExecCommand *c, const char *path, ...) {
return -ENOMEM;
r = strv_extend_strv(&c->argv, l);
- if (r < 0) {
- strv_free(l);
+ if (r < 0)
return r;
- }
return 0;
}
More information about the systemd-commits
mailing list