projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
system-linux: fix memory leak in system_addr()
[project/netifd.git]
/
system-linux.c
diff --git
a/system-linux.c
b/system-linux.c
index
f51c078
..
27c0f1e
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;