Change in libosmocore[master]: stat_item: tolerate NULL pointer argument in osmo_stat_item_group_free

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Dec 15 14:04:45 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/26569 )

Change subject: stat_item: tolerate NULL pointer argument in osmo_stat_item_group_free
......................................................................

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
---
M src/stat_item.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/stat_item.c b/src/stat_item.c
index 1f398d5..804972b 100644
--- a/src/stat_item.c
+++ b/src/stat_item.c
@@ -224,6 +224,9 @@
 /*! 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);
 }

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/26569
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I23323833e7268356a50c4fc6a19639c4ecd2a101
Gerrit-Change-Number: 26569
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211215/c739d1d8/attachment.htm>


More information about the gerrit-log mailing list