]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kernel/sys.c: avoid argv_free(NULL)
authorAndrew Morton <akpm@linux-foundation.org>
Sat, 21 Jul 2012 00:54:41 +0000 (10:54 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Jul 2012 03:53:12 +0000 (13:53 +1000)
commita1cf18360a21d9320219597868fea58a9488a374
tree3ada563d854d6561ab036482cd9d94ee50f6e1c1
parente02a8a35d041d11c701c55273b2f7136f2d2fe80
kernel/sys.c: avoid argv_free(NULL)

If argv_split() failed, the code will end up calling argv_free(NULL).  Fix
it up and clean things up a bit.

Addresses Coverity report 703573.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/sys.c