forked from enlightenment/efl
Fix memleak reported by Coverity:
If we have file And fname, then we can call the source_fetch_file function, HOWEVER we may only have One or the Other in which case we still need to potentially free the other. NB: Fixes Coverity CID1039296 Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
61e17aa5c2
commit
7fc497ee6e
|
@ -192,11 +192,10 @@ source_fetch_file(const char *fil, const char *filname)
|
|||
got_hash = 0;
|
||||
}
|
||||
if ((file) && (fname))
|
||||
{
|
||||
source_fetch_file(file, fname);
|
||||
free(file);
|
||||
free(fname);
|
||||
}
|
||||
source_fetch_file(file, fname);
|
||||
|
||||
if (file) free(file);
|
||||
if (fname) free(fname);
|
||||
}
|
||||
free(dir);
|
||||
fclose(f);
|
||||
|
|
Loading…
Reference in New Issue