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:
fa2403d
)
netifd: fix resource leak on error in netifd_add_dynamic()
author
Hans Dedecker
<dedeckeh@gmail.com>
Mon, 26 Nov 2018 08:59:52 +0000
(09:59 +0100)
committer
Hans Dedecker
<dedeckeh@gmail.com>
Mon, 26 Nov 2018 09:00:43 +0000
(10:00 +0100)
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
ubus.c
patch
|
blob
|
history
diff --git
a/ubus.c
b/ubus.c
index f5e4997f8f7b006bc92c53b4b68818293fc16b09..14688c25c876aedc17a215b0511dd67bdc10e7a4 100644
(file)
--- a/
ubus.c
+++ b/
ubus.c
@@
-143,16
+143,17
@@
netifd_add_dynamic(struct ubus_context *ctx, struct ubus_object *obj,
config = blob_memdup(msg);
if (!config)
- goto error
_free
;
+ goto error;
if (!interface_add(iface, config))
- goto error;
+ goto error
_free_config
;
return UBUS_STATUS_OK;
-error_free:
- free(
iface
);
+error_free
_config
:
+ free(
config
);
error:
+ free(iface);
return UBUS_STATUS_UNKNOWN_ERROR;
}