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