mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-01-28 01:27:16 +01:00
Fix memory leaks
This commit is contained in:
parent
6b061b56d8
commit
506429fdfe
3 changed files with 10 additions and 2 deletions
|
|
@ -86,7 +86,10 @@ static void send_du_state_change_notif(struct blob_attr *msg)
|
|||
if (tb[1]) {
|
||||
char *uuid = NULL, *oper = NULL;
|
||||
|
||||
CWMP_LOG(INFO, "%s\n", blobmsg_format_json_indent(tb[1], true, -1));
|
||||
char *str = blobmsg_format_json_indent(tb[1], true, -1);
|
||||
CWMP_LOG(INFO, "%s\n", str);
|
||||
FREE(str);
|
||||
|
||||
struct blob_attr *tb1[9] = {NULL};
|
||||
blobmsg_parse(p1, 9, tb1, blobmsg_data(tb[1]), blobmsg_len(tb[1]));
|
||||
|
||||
|
|
@ -217,7 +220,10 @@ static void send_transfer_complete_notif(struct blob_attr *msg)
|
|||
if (tb[1]) {
|
||||
char file_type[256] = {0};
|
||||
|
||||
CWMP_LOG(INFO, "%s\n", blobmsg_format_json_indent(tb[1], true, -1));
|
||||
char *str = blobmsg_format_json_indent(tb[1], true, -1);
|
||||
CWMP_LOG(INFO, "%s\n", str);
|
||||
FREE(str);
|
||||
|
||||
struct blob_attr *tb1[10] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
|
||||
blobmsg_parse(p1, 6, tb1, blobmsg_data(tb[1]), blobmsg_len(tb[1]));
|
||||
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ int download_file_in_subprocess(const char *file_path, const char *url, const ch
|
|||
|
||||
if (download_task != NULL) {
|
||||
char *ret = execute_task_in_subprocess(download_task);
|
||||
FREE(download_task);
|
||||
return ret ? atoi(ret) : 500;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -196,6 +196,7 @@ int upload_file_in_subprocess(const char *file_path, const char *url, const char
|
|||
|
||||
if (upload_task != NULL) {
|
||||
char *ret = execute_task_in_subprocess(upload_task);
|
||||
FREE(upload_task);
|
||||
return ret ? atoi(ret) : 500;
|
||||
}
|
||||
return 500;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue