CU-UP: fix direct memory leak

Note that this strdup has been intentioally created for debugging
purposes in core files.

See also: 1ab3b8dd8e ("add version signature in core files...")
This commit is contained in:
Robert Schmidt
2025-10-27 18:54:19 +01:00
parent 155ee5ad42
commit a2b127f643

View File

@@ -150,7 +150,8 @@ int main(int argc, char **argv)
time_manager_start(tick_functions, tick_functions_count, TIME_SOURCE_REALTIME);
// strdup to put the sring in the core file for post mortem identification
LOG_I(HW, "Version: %s\n", strdup(OAI_PACKAGE_VERSION));
char *v = strdup(OAI_PACKAGE_VERSION);
LOG_I(HW, "Version: %s\n", v);
set_softmodem_sighandler();
itti_init(TASK_MAX, tasks_info);
int rc;
@@ -189,6 +190,8 @@ int main(int argc, char **argv)
time_manager_finish();
free(v);
logClean();
printf("Bye.\n");
return 0;