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:
Philipp Maier 2021-12-14 15:32:53 +01:00
parent 26728951f5
commit 627a897261
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}