aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-11-08 06:48:12 +0000
committerJan Hutter <jhutter@hsr.ch>2005-11-08 06:48:12 +0000
commit27d2b681abfe0da14fda0934a0b9cbd04374498b (patch)
treee0f9e7f2bc98661782b40235f2eb4126fb30b25c /Source
parent6d4f09bc5f764a59a6e7b83856cb8716bc1f540c (diff)
downloadstrongswan-27d2b681abfe0da14fda0934a0b9cbd04374498b.tar.bz2
strongswan-27d2b681abfe0da14fda0934a0b9cbd04374498b.tar.xz
- freeing of NULL pointer is checked
Diffstat (limited to 'Source')
-rw-r--r--Source/charon/packet.c5
1 files changed, 4 insertions, 1 deletions
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;
}