diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-03-27 14:17:12 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-03-27 14:17:12 -0700 |
commit | 6c01e8b9f040d591f72882aff08ed21446fbb567 (patch) | |
tree | 71f04dae22291d7321e5bb244462ab1145c47ee6 /src/base/cmd/cmdLoad.c | |
parent | 1ec437d04b2fcb42054f068525c2a1b21b69fe53 (diff) | |
download | abc-6c01e8b9f040d591f72882aff08ed21446fbb567.tar.gz abc-6c01e8b9f040d591f72882aff08ed21446fbb567.tar.bz2 abc-6c01e8b9f040d591f72882aff08ed21446fbb567.zip |
Fixed a number of small bugs and memory leaks.
Diffstat (limited to 'src/base/cmd/cmdLoad.c')
-rw-r--r-- | src/base/cmd/cmdLoad.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |