Browse Source

Closed potential memory leaks. Thanks Eliska Svobodova.

master
Thomas Schmitt 3 years ago
parent
commit
3eba8cc921
  1. 3
      xorriso/emulators.c
  2. 3
      xorriso/opts_p_z.c
  3. 5
      xorriso/text_io.c
  4. 2
      xorriso/xorriso_timestamp.h

3
xorriso/emulators.c

@ -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)

3
xorriso/opts_p_z.c

@ -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);

5
xorriso/text_io.c

@ -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;

2
xorriso/xorriso_timestamp.h

@ -1 +1 @@
#define Xorriso_timestamP "2019.08.13.161913"
#define Xorriso_timestamP "2019.08.14.094038"

Loading…
Cancel
Save