summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-12-10 16:04:47 +0100
committerThomas Haller <thaller@redhat.com>2015-12-10 17:13:48 +0100
commiteeb7d20ee0f55f38beb40c099b0fd727e3ff9087 (patch)
tree24fdcb5926131c0050802383d3ac709bfd3b0ef2
parent10b684b82704274b86f729203df0f760589d762d (diff)
downloadNetworkManager-eeb7d20ee0f55f38beb40c099b0fd727e3ff9087.tar.gz
platform: fix memleak in _nl_sock_flush_data()
Fixes: 9a16ce08765faf76e29300090661a5c8e979f6bb
-rw-r--r--src/platform/nm-linux-platform.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 08e09ddb52..3cceff79c7 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -2254,8 +2254,11 @@ _nl_sock_flush_data (struct nl_sock *sk)
{
int nle;
struct nl_cb *cb;
+ struct nl_cb *cb0;
- cb = nl_cb_clone (nl_socket_get_cb (sk));
+ cb0 = nl_socket_get_cb (sk);
+ cb = nl_cb_clone (cb0);
+ nl_cb_put (cb0);
if (cb == NULL)
return -NLE_NOMEM;