Skip to content
Snippets Groups Projects
Commit fd66014b authored by dmitriy.gerasimov's avatar dmitriy.gerasimov
Browse files

[!] Massive memory leaks fixes

parent 4984075d
No related branches found
No related tags found
1 merge request!226Release 4.4
......@@ -8,7 +8,7 @@ set(CMAKE_C_STANDARD 11)
SET( CPACK_PACKAGE_NAME "${PROJECT_NAME}")
SET( CPACK_PACKAGE_VERSION_MAJOR 4)
SET( CPACK_PACKAGE_VERSION_MINOR 4)
SET( CPACK_PACKAGE_VERSION_PATCH 14)
SET( CPACK_PACKAGE_VERSION_PATCH 15)
# init CellFrame SDK
add_definitions("-DDAP_VERSION=\"${CPACK_PACKAGE_VERSION_MAJOR}-${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\"")
......
Subproject commit 7b50180e79d04452b756ac240a1bac1eafb2d9e2
Subproject commit 9f4160ac18c60128ca4c1fd95d234fb5729c9dd2
......@@ -59,7 +59,7 @@ static char** split_word(char *line, int *argc)
*argc = 0;
return NULL ;
}
char **argv = calloc(sizeof(char*), strlen(line));
char **argv = DAP_NEW_Z_SIZE(char*, sizeof(char*) * strlen(line));
int n = 0;
char *s, *start = line;
size_t len = strlen(line);
......@@ -131,9 +131,11 @@ int execute_line(char *line)
cmd.cmd_param = (char**) (argv + 1);
// Send command
int res = dap_app_cli_post_command(cparam, &cmd);
DAP_DELETE(argv);
return res;
}
fprintf(stderr, "No command\n");
DAP_DELETE(argv);
return -1; //((*(command->func))(argc, (const char **) argv, NULL));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment