C++: Fix Packet destructor for packets without payload.

This commit is contained in:
Martin Ling 2014-07-24 18:10:33 +01:00
parent 4178d9712f
commit 1797a887d7
1 changed files with 2 additions and 1 deletions

View File

@ -916,7 +916,8 @@ Packet::Packet(const struct sr_datafeed_packet *structure) :
Packet::~Packet()
{
delete payload;
if (payload)
delete payload;
}
const PacketType *Packet::get_type()