diff mbox

[opensm] osm_subnet.c: Fix resource leak neighbor parser ("subn_validate_neighbor" function)

Message ID 530B5FCD.3000700@dev.mellanox.co.il (mailing list archive)
State Accepted
Delegated to: Hal Rosenstock
Headers show

Commit Message

Hal Rosenstock Feb. 24, 2014, 3:05 p.m. UTC
From: Dan Ben Yosef <danby@dev.mellanox.co.il>

Fix resource leak after neighbor validation

Signed-off-by: Dan Ben Yosef <danby@dev.mellanox.co.il>
Reviewed-by: Vladimir Koushnir <vladimirk@mellanox.com>
---
 opensm/osm_subnet.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/opensm/osm_subnet.c b/opensm/osm_subnet.c
index 77e486a..e9024ac 100644
--- a/opensm/osm_subnet.c
+++ b/opensm/osm_subnet.c
@@ -1051,6 +1051,7 @@  static void subn_validate_neighbor(osm_subn_t *p_subn)
 					"guid:0x%016" PRIx64 " port:%u\n",
 					p_item->guid, p_item->portnum);
 		}
+		free(p_item);
 	}
 
 Exit: