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

Commit ca6de177 authored by Eli Cohen's avatar Eli Cohen Committed by Roland Dreier
Browse files

IPoIB: Fix error path memory leak



Clean up properly if ib_query_pkey() or ib_query_gid() fail.

Signed-off-by: default avatarEli Cohen <eli@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent b3ac60fc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1083,7 +1083,7 @@ static struct net_device *ipoib_add_port(const char *format,
	if (result) {
		printk(KERN_WARNING "%s: ib_query_pkey port %d failed (ret = %d)\n",
		       hca->name, port, result);
		goto alloc_mem_failed;
		goto device_init_failed;
	}

	/*
@@ -1099,7 +1099,7 @@ static struct net_device *ipoib_add_port(const char *format,
	if (result) {
		printk(KERN_WARNING "%s: ib_query_gid port %d failed (ret = %d)\n",
		       hca->name, port, result);
		goto alloc_mem_failed;
		goto device_init_failed;
	} else
		memcpy(priv->dev->dev_addr + 4, priv->local_gid.raw, sizeof (union ib_gid));