[OpenWrt-Devel] [PATCH] ubus: Fix memleak in examples/client in case of failure
Hans Dedecker
dedeckeh at gmail.com
Tue Apr 28 10:07:28 EDT 2015
Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
examples/client.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/client.c b/examples/client.c
index 952ab54..7ef5663 100644
--- a/examples/client.c
+++ b/examples/client.c
@@ -118,6 +118,7 @@ static void test_count(struct uloop_timeout *timeout)
blobmsg_add_string(&b, "string", s);
if (ubus_lookup_id(ctx, "test", &id)) {
+ free(s);
fprintf(stderr, "Failed to look up test object\n");
return;
}
--
1.9.1
_______________________________________________
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