[PATCH 2/7] ip6: fix leak in process_addr()
- From: Thomas Graf <tgraf redhat com>
- To: dcbw redhat com
- Cc: Thomas Graf <tgraf redhat com>, networkmanager-list gnome org
- Subject: [PATCH 2/7] ip6: fix leak in process_addr()
- Date: Fri, 9 Sep 2011 11:39:04 +0200
rtnladdr is leaked if nm_ip6_manager_get_device() returns NULL.
---
src/ip6-manager/nm-ip6-manager.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/ip6-manager/nm-ip6-manager.c b/src/ip6-manager/nm-ip6-manager.c
index d882b00..f0dc7c3 100644
--- a/src/ip6-manager/nm-ip6-manager.c
+++ b/src/ip6-manager/nm-ip6-manager.c
@@ -551,6 +551,7 @@ process_addr (NMIP6Manager *manager, struct nl_msg *msg)
device = nm_ip6_manager_get_device (manager, rtnl_addr_get_ifindex (rtnladdr));
if (!device) {
nm_log_dbg (LOGD_IP6, "ignoring message for unknown device");
+ rtnl_addr_put (rtnladdr);
return NULL;
}
--
1.7.6
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]