ElfReader: fix conditional free
buff cannot be zero. Found by Coverity Scan, CID 25712. Change-Id: Ibb411be376aab13832e3e5593fe001df1cbfc051
This commit is contained in:
@ -105,8 +105,7 @@ void ElfReader::setup(const char* path) {
|
|||||||
process_section(&sec_hdr, buff);
|
process_section(&sec_hdr, buff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (buff)
|
free(buff);
|
||||||
free(buff);
|
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user