diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index b188ead832..7a141be471 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -664,7 +664,8 @@ int main( int argc, char **argv ) { #define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL" #endif // strdup to put the sring in the core file for post mortem identification - LOG_I(HW, "Version: %s\n", strdup(PACKAGE_VERSION)); + char *pckg = strdup(PACKAGE_VERSION); + LOG_I(HW, "Version: %s\n", pckg); // don't create if node doesn't connect to RRC/S1/GTP const ngran_node_t node_type = get_node_type(); @@ -819,6 +820,7 @@ int main( int argc, char **argv ) { RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice); } + free(pckg); logClean(); printf("Bye.\n"); return 0;