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