diff options
Diffstat (limited to 'src/base/cmd')
-rw-r--r-- | src/base/cmd/cmd.c | 2 | ||||
-rw-r--r-- | src/base/cmd/cmdLoad.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/base/cmd/cmd.c b/src/base/cmd/cmd.c index 15cbdda5..35eb535a 100644 --- a/src/base/cmd/cmd.c +++ b/src/base/cmd/cmd.c @@ -671,7 +671,7 @@ int CmdCommandSource( Abc_Frame_t * pAbc, int argc, char **argv ) } if ( interactive && *line != '\0' ) { - Cmd_HistoryAddCommand( pAbc, Extra_UtilStrsav(line) ); + Cmd_HistoryAddCommand( pAbc, line ); if ( pAbc->Hst != NULL ) { fprintf( pAbc->Hst, "%s\n", line ); diff --git a/src/base/cmd/cmdLoad.c b/src/base/cmd/cmdLoad.c index b96737c6..797275db 100644 --- a/src/base/cmd/cmdLoad.c +++ b/src/base/cmd/cmdLoad.c @@ -58,6 +58,7 @@ int CmdCommandLoad( Abc_Frame_t * pAbc, int argc, char ** argv ) // check if there is the binary if ( (pFile = fopen( Vec_StrArray(vCommand), "r" )) == NULL ) { + Vec_StrFree( vCommand ); Abc_Print( -1, "Cannot run the binary \"%s\".\n\n", Vec_StrArray(vCommand) ); return 1; } @@ -73,10 +74,12 @@ int CmdCommandLoad( Abc_Frame_t * pAbc, int argc, char ** argv ) // run the command line if ( Util_SignalSystem( Vec_StrArray(vCommand) ) ) { + Vec_StrFree( vCommand ); Abc_Print( -1, "The following command has returned non-zero exit status:\n" ); Abc_Print( -1, "\"%s\"\n", Vec_StrArray(vCommand) ); return 1; } + Vec_StrFree( vCommand ); return 0; } |