Closed memory leaks on lack of memory reported by cppcheck

This commit is contained in:
Thomas Schmitt 2015-07-04 08:49:24 +00:00
parent 99b8a71f34
commit 1a15cc20f9
2 changed files with 3 additions and 3 deletions

View File

@ -2576,7 +2576,7 @@ int Xorriso_program_arg_bsl(struct XorrisO *xorriso, int argc, char ***argv,
Xorriso_alloc_meM(cmd_data, char, cmd_data_size); Xorriso_alloc_meM(cmd_data, char, cmd_data_size);
new_argv= (char **) Smem_malloC(argc * sizeof(char *)); new_argv= (char **) Smem_malloC(argc * sizeof(char *));
if(new_argv == NULL) if(new_argv == NULL)
return(-1); {ret= -1; goto ex;}
for(i= 0; i < argc; i++) { for(i= 0; i < argc; i++) {
new_argv[i]= strdup((*argv)[i]); new_argv[i]= strdup((*argv)[i]);
if(new_argv[i] == NULL) if(new_argv[i] == NULL)
@ -2864,7 +2864,7 @@ int Xorriso_execv(struct XorrisO *xorriso, char *cmd,
child_pid= fork(); child_pid= fork();
if(child_pid==-1) if(child_pid==-1)
return(-1); {ret= -1; goto ex;}
if(child_pid==0) { if(child_pid==0) {
/* this is the child process */ /* this is the child process */

View File

@ -1 +1 @@
#define Xorriso_timestamP "2015.06.30.144252" #define Xorriso_timestamP "2015.07.04.084911"