In the destructor, free the memory allocated for elementReader_.partialData.
diff --git a/ndn-cpp/transport/udp-transport.hpp b/ndn-cpp/transport/udp-transport.hpp
index a54839f..17f6e25 100644
--- a/ndn-cpp/transport/udp-transport.hpp
+++ b/ndn-cpp/transport/udp-transport.hpp
@@ -18,6 +18,7 @@
{
ndn_UdpTransport_init(&transport_);
face_ = 0;
+ elementReader_.partialData.array = 0;
}
/**
@@ -47,6 +48,8 @@
*/
virtual void close();
+ ~UdpTransport();
+
private:
struct ndn_UdpTransport transport_;
Face *face_;