Closed potential memory leaks. Thanks Eliska Svobodova.

This commit is contained in:
2019-08-14 11:40:53 +02:00
parent b356291700
commit 3eba8cc921
4 changed files with 7 additions and 6 deletions

View File

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