From: Nick Porter Date: Wed, 24 Aug 2022 11:47:12 +0000 (+0100) Subject: fr_dlist_talloc_free_item returns previous item in list X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f2faac36a78458db02468794dbbcb6a653b464c;p=thirdparty%2Ffreeradius-server.git fr_dlist_talloc_free_item returns previous item in list So retain functionality for typed versions of the function. --- diff --git a/src/lib/util/dlist.h b/src/lib/util/dlist.h index b9e20914ab0..5033a50a706 100644 --- a/src/lib/util/dlist.h +++ b/src/lib/util/dlist.h @@ -1185,8 +1185,8 @@ DIAG_OFF(unused-function) \ static inline void _name ## _talloc_free_tail(FR_DLIST_HEAD(_name) *list) \ { fr_dlist_talloc_free_tail(&list->head); } \ \ - static inline void _name ## _talloc_free_item(FR_DLIST_HEAD(_name) *list, _element_type *ptr) \ - { fr_dlist_talloc_free_item(&list->head, ptr); } \ + static inline _element_type * _name ## _talloc_free_item(FR_DLIST_HEAD(_name) *list, _element_type *ptr) \ + {return fr_dlist_talloc_free_item(&list->head, ptr); } \ \ static inline void _name ## _talloc_free(FR_DLIST_HEAD(_name) *list) \ { fr_dlist_talloc_free(&list->head); } \