hashcat / hashcat-utils

Small utilities that are useful in advanced password cracking
MIT License
1.36k stars 355 forks source link

Fixed resource leak issue #88

Closed mgiannopoulos24 closed 3 months ago

mgiannopoulos24 commented 4 months ago

Fixed:

src/cap2hccapx.c:932:5: error: Resource leak: pcap [resourceLeak]
    return -1;
    ^
src/cap2hccapx.c:959:5: error: Resource leak: pcap [resourceLeak]
    return 1;
    ^
src/cap2hccapx.c:980:5: error: Resource leak: pcap [resourceLeak]
    return -1;
    ^

To address this, I added a fclose(pcap); statement before the return 1; line to release the resource.