mirror of https://gerrit.osmocom.org/libosmocore
stat_item: tolerate NULL pointer argument in osmo_stat_item_group_free
Just like rate_ctr_group_free, osmo_stat_item_group_free should tolerate it when the argument is NULL Change-Id: I23323833e7268356a50c4fc6a19639c4ecd2a101
This commit is contained in:
parent
26728951f5
commit
627a897261
|
@ -224,6 +224,9 @@ struct osmo_stat_item_group *osmo_stat_item_group_alloc(void *ctx,
|
|||
/*! Free the memory for the specified group of stat items */
|
||||
void osmo_stat_item_group_free(struct osmo_stat_item_group *grp)
|
||||
{
|
||||
if (!grp)
|
||||
return;
|
||||
|
||||
llist_del(&grp->list);
|
||||
talloc_free(grp);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue