From 27d2b681abfe0da14fda0934a0b9cbd04374498b Mon Sep 17 00:00:00 2001 From: Jan Hutter Date: Tue, 8 Nov 2005 06:48:12 +0000 Subject: [PATCH] - freeing of NULL pointer is checked --- Source/charon/packet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/charon/packet.c b/Source/charon/packet.c index f67d7a6e4..2d82bcedd 100644 --- a/Source/charon/packet.c +++ b/Source/charon/packet.c @@ -25,7 +25,10 @@ static status_t destroy(packet_t *this) { - pfree(this->data.ptr); + if (this->data.ptr != NULL) + { + pfree(this->data.ptr); + } pfree(this); return SUCCESS; }