file: free memory after opendir()
Signed-off-by: Luka Perkov <luka@openwrt.org>
This commit is contained in:
parent
b65f6a844f
commit
361b823e8d
1 changed files with 2 additions and 0 deletions
2
file.c
2
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);
|
||||
|
|
Loading…
Reference in a new issue