ubus: Fix memleak in examples/client in case of failure
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
This commit is contained in:
parent
7798d56301
commit
38174a05a5
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue