projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c87bc03
)
system-linux: fix memory leak in system_addr()
author
Felix Fietkau
<nbd@openwrt.org>
Thu, 29 Oct 2015 14:58:30 +0000
(15:58 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Thu, 29 Oct 2015 14:58:31 +0000
(15:58 +0100)
Detected by Coverity CID
1330178
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
system-linux.c
patch
|
blob
|
history
diff --git
a/system-linux.c
b/system-linux.c
index f51c0785911e486ca40bdd886e9e2b82cb846fcb..27c0f1e3416baaece91579dd32cf66daf87ce805 100644
(file)
--- a/
system-linux.c
+++ b/
system-linux.c
@@
-1532,8
+1532,10
@@
static int system_addr(struct device *dev, struct device_addr *addr, int cmd)
if (addr->valid_until) {
int64_t valid = addr->valid_until - now;
- if (valid <= 0)
+ if (valid <= 0) {
+ nlmsg_free(msg);
return -1;
+ }
else if (valid > UINT32_MAX)
valid = UINT32_MAX;