projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7aee60d
)
interface-ip: fix memory leak on error in interface_update_prefix_assignments()
author
Hans Dedecker
<dedeckeh@gmail.com>
Thu, 12 Apr 2018 20:08:18 +0000
(22:08 +0200)
committer
Hans Dedecker
<dedeckeh@gmail.com>
Thu, 12 Apr 2018 20:09:52 +0000
(22:09 +0200)
Detected by coverity in CID 141267
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
interface-ip.c
patch
|
blob
|
history
diff --git
a/interface-ip.c
b/interface-ip.c
index 6726a69bb0d010516a551b47f7e42da3a15f0bf4..27e9e4147af91123d1d6c32059c5dc6b0b626c89 100644
(file)
--- a/
interface-ip.c
+++ b/
interface-ip.c
@@
-994,8
+994,10
@@
static void interface_update_prefix_assignments(struct device_prefix *prefix, bo
}
entry = calloc(1, sizeof(*entry));
- if (!entry)
+ if (!entry) {
+ free(c);
continue;
+ }
entry->node.key = c;
avl_insert(&assign_later, &entry->node);