Prevented use of uninitialized variable in case of memory shortage. Coverity CID 28808.

This commit is contained in:
Thomas Schmitt 2015-11-06 12:51:34 +00:00
parent 64e2790557
commit 52d09aaf24
2 changed files with 5 additions and 4 deletions

View File

@ -360,6 +360,10 @@ int Xorriso_show_dux_subs(struct XorrisO *xorriso,
struct LinkiteM *own_link_stack;
char *path= NULL, *show_path= NULL, *name= NULL, *sfe= NULL;
own_link_stack= link_stack;
namept= name;
*size= 0;
sfe= malloc(5*SfileadrL);
path= malloc(SfileadrL);
show_path= malloc(SfileadrL);
@ -368,9 +372,6 @@ int Xorriso_show_dux_subs(struct XorrisO *xorriso,
Xorriso_no_malloc_memory(xorriso, &sfe, 0);
{ret= -1; goto ex;}
}
own_link_stack= link_stack;
namept= name;
*size= 0;
if(lstat(abs_path, &stbuf)==-1)
{ret= 2; goto ex;}

View File

@ -1 +1 @@
#define Xorriso_timestamP "2015.11.06.124702"
#define Xorriso_timestamP "2015.11.06.125101"