Commit bf17c1c7 authored by Roland Dreier's avatar Roland Dreier

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: default avatarRoland Dreier <rolandd@cisco.com>
parent 6b63e301
...@@ -1448,6 +1448,7 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) ...@@ -1448,6 +1448,7 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target)
strlcpy(dgid, p + i * 2, 3); strlcpy(dgid, p + i * 2, 3);
target->path.dgid.raw[i] = simple_strtoul(dgid, NULL, 16); target->path.dgid.raw[i] = simple_strtoul(dgid, NULL, 16);
} }
kfree(p);
break; break;
case SRP_OPT_PKEY: case SRP_OPT_PKEY:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment