cmd: fix freeing arglist with correct size
This commit is contained in:
parent
06eee5bde7
commit
436da6a7aa
@ -21,5 +21,6 @@ int main (int argc, char *argv[]) {
|
||||
LOG_INFO("Project full path: %s", full_path);
|
||||
identify_platfrom_from_project(full_path);
|
||||
cdo_free((void*)full_path);
|
||||
free_arg_list(args);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ const char* extract_value_from_arg(struct ArgList* list, ArgNameId id) {
|
||||
}
|
||||
|
||||
void free_arg_list(struct ArgList* list) {
|
||||
for (size_t i = 0; i < ARG_COUNT; i++) {
|
||||
for (size_t i = 0; i < list->size; i++) {
|
||||
cdo_free(list->args[i].name);
|
||||
cdo_free(list->args[i].description);
|
||||
cdo_free(list->args[i].value);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user