strv: introduce new strv_from_stdarg_alloca() macro to generate a string array from stdarg function parameters
This allows us to turn lists of strings passed in easily into string arrays without having to allocate memory.
This commit is contained in:
+2
-1
@@ -2214,7 +2214,8 @@ int exec_command_set(ExecCommand *c, const char *path, ...) {
|
||||
if (!l)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!(p = strdup(path))) {
|
||||
p = strdup(path);
|
||||
if (!p) {
|
||||
strv_free(l);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user