Memory leak bug fix discovered through the "altered HMAC test"
This commit fixes a memory leak caught with valgrind in the "altered HMAC
test":
[+] fwknop functions (unique view):
- 9 : ???
- 4 : main
- 4 : pcap_capture
- 2 : incoming_spa
- 2 : fko_new_with_data
- 2 : fko_verify_hmac
+ 7 : ???
+ 2 : pcap_capture
+ 2 : main
1 : pcap_compile
- 1 : strdup
- 1 : fko_calculate_hmac
- 1 : add_salted_str
[+] fwknop functions (with call line numbers):
- 9 : ??? (in /usr/lib/x86_64-linux-gnu/libpcap.so.1.1.1)
- 4 : main (fwknopd.c:299)
- 2 : fko_new_with_data (fko_funcs.c:220)
- 2 : pcap_capture (pcap_capture.c:226)
- 2 : incoming_spa (incoming_spa.c:378)
- 1 : add_salted_str (cipher_funcs.c:298)
- 1 : strdup (strdup.c:43)
- 1 : fko_verify_hmac (fko_hmac.c:78)
- 1 : fko_verify_hmac (fko_hmac.c:92)
- 1 : pcap_capture (pcap_capture.c:105)
+ 7 : ??? (in /usr/lib/x86_64-linux-gnu/libpcap.so.1.1.1)
+ 2 : main (fwknopd.c:299)
1 : pcap_compile (in /usr/lib/x86_64-linux-gnu/libpcap.so.1.1.1)
1 : pcap_capture (pcap_capture.c:97)
- 1 : fko_calculate_hmac (fko_hmac.c:169)
+ 1 : pcap_capture (pcap_capture.c:105)