- freeing of NULL pointer is checked
This commit is contained in:
1 parent
6d4f09bc5f
commit
27d2b681ab
1 file changed
+4
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user