mfontanini / libtins

High-level, multiplatform C++ network packet sniffing and crafting library.
http://libtins.github.io/
BSD 2-Clause "Simplified" License
1.91k stars 375 forks source link

Fix several leaks #343

Closed pallas closed 5 years ago

pallas commented 5 years ago

This series fixes two issues.

  1. Using pcapgeterr after handle is closed.
  2. Failing to free filter and handle on construction error.

Found by Valgrind.

mfontanini commented 5 years ago

Ugh this sucks. Maybe some day the library will be C++11 only and will be able to use unique_ptr for these type of things.

Thanks!