mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
Merge pull request #142 from teg/sd-network-unref-NULL
sd-network: allow NULL in sd_network_monitor_unref
This commit is contained in:
commit
5410b2ed62
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user