drm/i915: Immediately discard any backing storage for uneeded objects
[safe/jmp/linux-2.6] / kernel / kmod.c
index b750675..385c31a 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/unistd.h>
 #include <linux/kmod.h>
 #include <linux/slab.h>
-#include <linux/mnt_namespace.h>
 #include <linux/completion.h>
 #include <linux/file.h>
 #include <linux/fdtable.h>
@@ -370,8 +369,10 @@ struct subprocess_info *call_usermodehelper_setup(char *path, char **argv,
        sub_info->argv = argv;
        sub_info->envp = envp;
        sub_info->cred = prepare_usermodehelper_creds();
-       if (!sub_info->cred)
+       if (!sub_info->cred) {
+               kfree(sub_info);
                return NULL;
+       }
 
   out:
        return sub_info;