From 7eff43de41bdad9216c9ab9680c9ae52baa5ea1e Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 16 Nov 2022 11:23:32 -0700 Subject: [PATCH] Fix two instances of use after free --- src/base/cmd/cmdLoad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/cmd/cmdLoad.c b/src/base/cmd/cmdLoad.c index bd511feca..1cf4d3ff9 100644 --- a/src/base/cmd/cmdLoad.c +++ b/src/base/cmd/cmdLoad.c @@ -58,8 +58,8 @@ 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) ); + Vec_StrFree( vCommand ); return 1; } fclose( pFile ); @@ -74,9 +74,9 @@ 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) ); + Vec_StrFree( vCommand ); return 1; } Vec_StrFree( vCommand );