From: Roland Dreier Date: Mon, 3 Apr 2006 16:31:04 +0000 (-0700) Subject: IB/srp: Fix memory leak in options parsing X-Git-Tag: v2.6.17-rc2~79^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce1823f0323be9f38bbe0df229a5bba025404923;p=linux-2.6 IB/srp: Fix memory leak in options parsing Fix memory leak if parsing destination GID fails. Coverity bug 1042 Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index fd8a95a9c5..5f2b3f6e4c 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1434,6 +1434,7 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) p = match_strdup(args); if (strlen(p) != 32) { printk(KERN_WARNING PFX "bad dest GID parameter '%s'\n", p); + kfree(p); goto out; }