diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2010-03-11 00:20:48 -0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2010-03-11 19:47:26 +1100 |
commit | c9d224fba0a8997d6008352f0be32aaaf4524fa1 (patch) | |
tree | 138e840a0a7f6df2ad3df1500119b68f4c63fff4 /kexec/kexec.c | |
parent | 6adc05c6e3fdbc8b9f5d915af78ca05d0a09cb17 (diff) |
Refix concat_cmdline
When removing the potential leak the logic was flipped which
mean we never reached the case for handling when both parameters
were set.
Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec.c')
-rw-r--r-- | kexec/kexec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kexec/kexec.c b/kexec/kexec.c index d282ade..43d0189 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -1007,9 +1007,9 @@ char *concat_cmdline(const char *base, const char *append) char *cmdline; if (!base && !append) return NULL; - if (append) + if (append && !base) return xstrdup(append); - if (base) + if (base && !append) return xstrdup(base); cmdline = xmalloc(strlen(base) + 1 + strlen(append) + 1); strcpy(cmdline, base); |