diff options
author | Djalal Harouni <tixxdz@opendz.org> | 2013-11-05 15:26:37 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-11-05 18:06:44 +0100 |
commit | b3451bed41453304735b68726571d49fb676d466 (patch) | |
tree | 68162a74bd840b059ecddc5f86215f7e9e94d8d3 /src/nspawn | |
parent | dd9f052591e482c57c57a92e2c7cc4b0470fe275 (diff) |
nspawn: log out of memory errors
Diffstat (limited to 'src/nspawn')
-rw-r--r-- | src/nspawn/nspawn.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 14774566a6..80903a7aef 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -224,6 +224,9 @@ static int parse_argv(int argc, char *argv[]) { case 'S': arg_slice = strdup(optarg); + if (!arg_slice) + return log_oom(); + break; case 'M': @@ -315,11 +318,11 @@ static int parse_argv(int argc, char *argv[]) { r = strv_extend(x, a); if (r < 0) - return r; + return log_oom(); r = strv_extend(x, b); if (r < 0) - return r; + return log_oom(); break; } |