• Andrew Morton's avatar
    kernel/sys.c: avoid argv_free(NULL) · b57b44ae
    Andrew Morton authored
    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: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b57b44ae
sys.c 52 KB