From ce1823f0323be9f38bbe0df229a5bba025404923 Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Mon, 3 Apr 2006 09:31:04 -0700 Subject: [PATCH] IB/srp: Fix memory leak in options parsing Fix memory leak if parsing destination GID fails. Coverity bug 1042 Signed-off-by: Roland Dreier --- drivers/infiniband/ulp/srp/ib_srp.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.39.5