Skip to content

Commit

Permalink
utils/ubus: fix memory leak at blobmsg_format_json
Browse files Browse the repository at this point in the history
  • Loading branch information
twy2010 authored and PolynomialDivision committed May 30, 2020
1 parent f603dde commit b5043ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/ubus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,11 +1061,13 @@ static void ubus_get_clients_cb(struct ubus_request *req, int type, struct blob_

if (entry == NULL) {
fprintf(stderr, "Failed to find interface!\n");
free(data_str);
return;
}

if (!entry->subscribed) {
fprintf(stderr, "Interface %s is not subscribed!\n", entry->iface_name);
free(data_str);
return;
}

Expand Down

0 comments on commit b5043ad

Please sign in to comment.