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

IB/srp: Fix memory leak in options parsing

Fix memory leak if parsing destination GID fails.

Coverity bug 1042

Signed-off-by: Roland Dreier <rolandd@cisco.com>

+1
+1
drivers/infiniband/ulp/srp/ib_srp.c
··· 1434 1434 p = match_strdup(args); 1435 1435 if (strlen(p) != 32) { 1436 1436 printk(KERN_WARNING PFX "bad dest GID parameter '%s'\n", p); 1437 + kfree(p); 1437 1438 goto out; 1438 1439 } 1439 1440