From: Hans Dedecker Date: Tue, 28 Apr 2015 14:07:28 +0000 (+0200) Subject: ubus: Fix memleak in examples/client in case of failure X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=38174a05a58629faf4b86a6dd34c00bb8c6904f2;p=oweals%2Fubus.git ubus: Fix memleak in examples/client in case of failure Signed-off-by: Hans Dedecker --- 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; }