projects
/
project
/
rpcd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32fba36
)
uci: free configs list memory on return
author
Yousong Zhou
<yszhou4tech@gmail.com>
Mon, 21 Oct 2019 06:10:29 +0000
(06:10 +0000)
committer
Jo-Philipp Wich
<jo@mein.io>
Tue, 29 Oct 2019 08:25:17 +0000
(09:25 +0100)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
[fix whitespace]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
uci.c
patch
|
blob
|
history
diff --git
a/uci.c
b/uci.c
index 0de6f3e23f8d3ba2fbfa1a653a9129ce26fb7dd0..522c24e8d569bf92aa8e1cf65d91d7c972135183 100644
(file)
--- a/
uci.c
+++ b/
uci.c
@@
-1286,6
+1286,8
@@
rpc_uci_changes(struct ubus_context *ctx, struct ubus_object *obj,
uci_unload(cursor, p);
}
+ free(configs);
+
blobmsg_close_table(&buf, c);
ubus_send_reply(ctx, req, buf.head);
@@
-1390,6
+1392,8
@@
rpc_uci_configs(struct ubus_context *ctx, struct ubus_object *obj,
for (i = 0; configs[i]; i++)
blobmsg_add_string(&buf, NULL, configs[i]);
+ free(configs);
+
blobmsg_close_array(&buf, c);
ubus_send_reply(ctx, req, buf.head);