projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa0d0ed
)
sd-network: allow NULL in sd_network_monitor_unref
author
Tom Gundersen
<teg@jklm.no>
Wed, 10 Jun 2015 13:55:09 +0000
(15:55 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Wed, 10 Jun 2015 14:34:43 +0000
(16:34 +0200)
Match rest of codebase, we always allow unref'ing NULL.
src/libsystemd/sd-network/sd-network.c
patch
|
blob
|
history
diff --git
a/src/libsystemd/sd-network/sd-network.c
b/src/libsystemd/sd-network/sd-network.c
index
db1f699
..
5879414
100644
(file)
--- 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;
}