Commit d553ad864e3b3dde3f1038d491e207021b2d6293
1 parent
65afac7d80
Exists in
master
and in
7 other branches
param: fix NULL comparison on oom
kp->arg is always true: it's the contents of that pointer we care about. Reported-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: stable@kernel.org
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
kernel/params.c
... | ... | @@ -222,7 +222,7 @@ |
222 | 222 | * don't need to; this mangled commandline is preserved. */ |
223 | 223 | if (slab_is_available()) { |
224 | 224 | *(char **)kp->arg = kstrdup(val, GFP_KERNEL); |
225 | - if (!kp->arg) | |
225 | + if (!*(char **)kp->arg) | |
226 | 226 | return -ENOMEM; |
227 | 227 | } else |
228 | 228 | *(const char **)kp->arg = val; |