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;
|
got_hash = 0;
|
||||||
}
|
}
|
||||||
if ((file) && (fname))
|
if ((file) && (fname))
|
||||||
{
|
source_fetch_file(file, fname);
|
||||||
source_fetch_file(file, fname);
|
|
||||||
free(file);
|
if (file) free(file);
|
||||||
free(fname);
|
if (fname) free(fname);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
free(dir);
|
free(dir);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
Loading…
Reference in New Issue