- freeing of NULL pointer is checked
This commit is contained in:
@@ -25,7 +25,10 @@
|
|||||||
|
|
||||||
static status_t destroy(packet_t *this)
|
static status_t destroy(packet_t *this)
|
||||||
{
|
{
|
||||||
pfree(this->data.ptr);
|
if (this->data.ptr != NULL)
|
||||||
|
{
|
||||||
|
pfree(this->data.ptr);
|
||||||
|
}
|
||||||
pfree(this);
|
pfree(this);
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user