Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

jffs2: fix another potential leak on error path in scan.c

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

+2 -2
+2 -2
fs/jffs2/scan.c
··· 130 130 if (jffs2_sum_active()) { 131 131 s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL); 132 132 if (!s) { 133 - kfree(flashbuf); 134 133 JFFS2_WARNING("Can't allocate memory for summary\n"); 135 - return -ENOMEM; 134 + ret = -ENOMEM; 135 + goto out; 136 136 } 137 137 } 138 138