Closed potential memory leaks. Thanks Eliska Svobodova.
This commit is contained in:
parent
b356291700
commit
3eba8cc921
@ -1034,8 +1034,7 @@ int Xorriso_genisofs_hide_list(struct XorrisO *xorriso, char *whom,
|
||||
}
|
||||
ret= 1;
|
||||
ex:;
|
||||
if(flag & 1)
|
||||
Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, 2);
|
||||
Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, 2);
|
||||
if(fp != NULL && fp != stdin)
|
||||
fclose(fp);
|
||||
if(ret<=0)
|
||||
|
@ -218,8 +218,7 @@ ex:;
|
||||
xorriso->allow_graft_points= allow_graft_points_mem;
|
||||
Sfile_make_argv("", "", &argc, &argv, 2);
|
||||
Xorriso_free_meM(pathspec);
|
||||
if(flag & 1)
|
||||
Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, 2);
|
||||
Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, 2);
|
||||
|
||||
if(fp != NULL && fp != stdin)
|
||||
fclose(fp);
|
||||
|
@ -725,8 +725,11 @@ int Xorriso_read_lines(struct XorrisO *xorriso, FILE *fp, int *linecount,
|
||||
if(*argv == NULL)
|
||||
{ret= -1; goto ex;}
|
||||
(*argv)[0]= strdup(line);
|
||||
if((*argv)[0] == NULL)
|
||||
if((*argv)[0] == NULL) {
|
||||
free(*argv);
|
||||
(*argv)= NULL;
|
||||
{ret= -1; goto ex;}
|
||||
}
|
||||
*argc= 1;
|
||||
}
|
||||
ret= 1;
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2019.08.13.161913"
|
||||
#define Xorriso_timestamP "2019.08.14.094038"
|
||||
|
Loading…
Reference in New Issue
Block a user