summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-05-13 13:54:08 +0200
committerThomas Haller <thaller@redhat.com>2015-05-13 14:24:06 +0200
commit0c258402c72cf691cf24d0955d2b98a8675cd62a (patch)
treefcca95e3fb81011fd2bee1aa6089c622d702712d
parent8e2ad8a3bd30d6e20486d718cd651ade32c47cc6 (diff)
downloadNetworkManager-0c258402c72cf691cf24d0955d2b98a8675cd62a.tar.gz
platform: fix memleak in link_delete()
Turns out, the valgrind suppression was hiding a memleak
-rw-r--r--src/platform/nm-linux-platform.c2
-rw-r--r--valgrind.suppressions16
2 files changed, 1 insertions, 17 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 7f700c2b32..5b9a33f1b8 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -2516,7 +2516,7 @@ static gboolean
link_delete (NMPlatform *platform, int ifindex)
{
NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform);
- struct rtnl_link *rtnllink = rtnl_link_get (priv->link_cache, ifindex);
+ auto_nl_object struct rtnl_link *rtnllink = rtnl_link_get (priv->link_cache, ifindex);
if (!rtnllink) {
platform->error = NM_PLATFORM_ERROR_NOT_FOUND;
diff --git a/valgrind.suppressions b/valgrind.suppressions
index 5f89c98b1e..b0d5301512 100644
--- a/valgrind.suppressions
+++ b/valgrind.suppressions
@@ -401,22 +401,6 @@
###############################################################
{
- libnl_01
- Memcheck:Leak
- match-leak-kinds: definite
- fun:calloc
- fun:nl_object_alloc
- fun:link_msg_parser
- fun:__pickup_answer
- fun:nl_cb_call
- fun:recvmsgs
- fun:nl_recvmsgs_report
- fun:nl_recvmsgs
- fun:nl_pickup
- fun:rtnl_link_get_kernel
- ...
-}
-{
# fixed by https://github.com/thom311/libnl/commit/d65c32a7205e679c7fc13f0e4565b13e698ba906
libnl_rtnl_link_set_type_01
Memcheck:Leak