Fix a memory leak on fuzzing code (#1036)

After allocation of pcap_buffer it is necessary to free it
This commit is contained in:
Hosein Ghahremanzadeh
2020-10-21 15:05:11 +02:00
committed by GitHub
parent 13d99a9390
commit bb33d57971
+1
View File
@@ -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) {
perror("fread failed");
fclose(pcap_file);
free(pcap_buffer);
return 1;
}