From: Luka Perkov Date: Tue, 10 Mar 2015 17:00:03 +0000 (+0100) Subject: file: free memory after opendir() X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=361b823e8d670bc122349041294983468ef36845;p=oweals%2Frpcd.git file: free memory after opendir() Signed-off-by: Luka Perkov --- 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);