Fix a memory leak on fuzzing code (#1036)
After allocation of pcap_buffer it is necessary to free it
This commit is contained in:
@@ -151,6 +151,7 @@ int main(int argc, char ** argv)
|
|||||||
if (fread(pcap_buffer, sizeof(*pcap_buffer), pcap_file_size, pcap_file) != pcap_file_size) {
|
if (fread(pcap_buffer, sizeof(*pcap_buffer), pcap_file_size, pcap_file) != pcap_file_size) {
|
||||||
perror("fread failed");
|
perror("fread failed");
|
||||||
fclose(pcap_file);
|
fclose(pcap_file);
|
||||||
|
free(pcap_buffer);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user