summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-24 23:45:33 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-24 23:46:13 +0100
commit79e16ce3bf734434081e57f1170333277830a592 (patch)
tree5edbca6884ba0427ad743a09be2ae1fbc48512f4 /src/libsystemd/sd-rtnl
parentc3ebdce39a748f738f3731730cd085ff3551b379 (diff)
networkd: fix a couple of memory leaks
Diffstat (limited to 'src/libsystemd/sd-rtnl')
-rw-r--r--src/libsystemd/sd-rtnl/sd-rtnl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsystemd/sd-rtnl/sd-rtnl.c b/src/libsystemd/sd-rtnl/sd-rtnl.c
index 551e95b592..695a2daccf 100644
--- a/src/libsystemd/sd-rtnl/sd-rtnl.c
+++ b/src/libsystemd/sd-rtnl/sd-rtnl.c
@@ -178,6 +178,12 @@ sd_rtnl *sd_rtnl_unref(sd_rtnl *rtnl) {
}
safe_close(rtnl->fd);
+
+ sd_event_source_unref(rtnl->io_event_source);
+ sd_event_source_unref(rtnl->time_event_source);
+ sd_event_source_unref(rtnl->exit_event_source);
+ sd_event_unref(rtnl->event);
+
free(rtnl);
return NULL;