Commit ce1823f0 authored by Roland Dreier's avatar Roland Dreier

IB/srp: Fix memory leak in options parsing

Fix memory leak if parsing destination GID fails.

Coverity bug 1042
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 227c939b
......@@ -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;
}
......
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