[OpenWrt-Devel] [PATCH 3/3] [rpcd] file: free memory after opendir()

Luka Perkov luka at openwrt.org
Tue Mar 10 13:00:03 EDT 2015


Signed-off-by: Luka Perkov <luka at openwrt.org>
---
 file.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/file.c b/file.c
index 9a3dfd8..31a937d 100644
--- a/file.c
+++ b/file.c
@@ -267,6 +267,8 @@ rpc_file_list(struct ubus_context *ctx, struct ubus_object *obj,
 		blobmsg_close_table(&buf, d);
 	}
 
+	closedir(fd);
+
 	blobmsg_close_array(&buf, c);
 	ubus_send_reply(ctx, req, buf.head);
 	blob_buf_free(&buf);
-- 
2.3.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list