Skip to content

Commit

Permalink
IB/srp: Coverity fix to srp_parse_options()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roland Dreier committed Mar 20, 2006
1 parent 6b63e30 commit bf17c1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bf17c1c

Please sign in to comment.