[OpenWrt-Devel] [PATCH rpcd 4/4] uci: free configs list memory on return
Yousong Zhou
yszhou4tech at gmail.com
Sun Oct 20 07:26:08 EDT 2019
Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
uci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/uci.c b/uci.c
index 1587a19..7667505 100644
--- a/uci.c
+++ b/uci.c
@@ -1284,6 +1284,7 @@ rpc_uci_changes(struct ubus_context *ctx, struct ubus_object *obj,
uci_unload(cursor, p);
}
+ free(configs);
blobmsg_close_table(&buf, c);
@@ -1388,6 +1389,7 @@ 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);
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list