From: Roland Dreier Date: Mon, 20 Mar 2006 18:08:25 +0000 (-0800) Subject: IB/srp: Coverity fix to srp_parse_options() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bf17c1c7cc9250d7c3c01b0ae898aefa1853535a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git IB/srp: Coverity fix to srp_parse_options() Fix leak found by Coverity: in the SRP_OPT_DGID case, srp_parse_options() didn't free the result of match_strdup(). Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 89ad29dc88d4..a13dcdf90a4f 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1448,6 +1448,7 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) strlcpy(dgid, p + i * 2, 3); target->path.dgid.raw[i] = simple_strtoul(dgid, NULL, 16); } + kfree(p); break; case SRP_OPT_PKEY: