diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-06-10 16:59:43 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-06-10 16:59:43 +0200 |
commit | 5410b2ed62289d8ab6575e64951ac7b6bda51d40 (patch) | |
tree | 34cc19de901fecc15a91119e7ff6bac0ec5e3249 /src | |
parent | Merge pull request #140 from teg/man-udev-timeout (diff) | |
parent | sd-network: allow NULL in sd_network_monitor_unref (diff) | |
download | systemd-5410b2ed62289d8ab6575e64951ac7b6bda51d40.tar.xz systemd-5410b2ed62289d8ab6575e64951ac7b6bda51d40.zip |
Merge pull request #142 from teg/sd-network-unref-NULL
sd-network: allow NULL in sd_network_monitor_unref
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-network/sd-network.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/sd-network/sd-network.c index db1f6997cb..587941497d 100644 --- a/src/libsystemd/sd-network/sd-network.c +++ b/src/libsystemd/sd-network/sd-network.c @@ -329,10 +329,10 @@ _public_ int sd_network_monitor_new(sd_network_monitor **m, const char *category _public_ sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *m) { int fd; - assert_return(m, NULL); - - fd = MONITOR_TO_FD(m); - close_nointr(fd); + if (m) { + fd = MONITOR_TO_FD(m); + close_nointr(fd); + } return NULL; } |