- freeing of NULL pointer is checked
This commit is contained in:
parent
6d4f09bc5f
commit
27d2b681ab
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue