Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce1823f0 authored by Roland Dreier's avatar Roland Dreier
Browse files

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1434,6 +1434,7 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target)
			p = match_strdup(args);
			p = match_strdup(args);
			if (strlen(p) != 32) {
			if (strlen(p) != 32) {
				printk(KERN_WARNING PFX "bad dest GID parameter '%s'\n", p);
				printk(KERN_WARNING PFX "bad dest GID parameter '%s'\n", p);
				kfree(p);
				goto out;
				goto out;
			}
			}