]> err.no Git - linux-2.6/commitdiff
IB/srp: Coverity fix to srp_parse_options()
authorRoland Dreier <rolandd@cisco.com>
Mon, 20 Mar 2006 18:08:25 +0000 (10:08 -0800)
committerRoland Dreier <rolandd@cisco.com>
Mon, 20 Mar 2006 18:08:25 +0000 (10:08 -0800)
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 <rolandd@cisco.com>
drivers/infiniband/ulp/srp/ib_srp.c

index 89ad29dc88d4dd07db907138b7afa4e95ad16fb6..a13dcdf90a4f11d4c886fa2b5486fc84d4c19b7b 100644 (file)
@@ -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: