IB/srp: Fix memory leak in options parsing
Fix memory leak if parsing destination GID fails. Coverity bug 1042 Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
227c939b00
commit
ce1823f032
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue