From: Roland Dreier Date: Mon, 3 Apr 2006 16:31:04 +0000 (-0700) Subject: IB/srp: Fix memory leak in options parsing X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ce1823f0323be9f38bbe0df229a5bba025404923;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 fd8a95a9c5d..5f2b3f6e4c4 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; }