]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Do talloc type checking if we have one set
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 17 Aug 2021 16:57:36 +0000 (11:57 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 17 Aug 2021 16:57:36 +0000 (11:57 -0500)
src/lib/util/lst.c

index bdc7d7849a85d8a5cc220dc8dcb930178ef6f869..c44d7fd5c01d8dfe757d32f5db1318bbf2e6c6a2 100644 (file)
@@ -640,6 +640,10 @@ static inline CC_HINT(nonnull) void _fr_lst_extract(fr_lst_t *lst,  stack_index_
  */
 static inline CC_HINT(nonnull) void _fr_lst_insert(fr_lst_t *lst, stack_index_t stack_index, void *data)
 {
+#ifndef TALLOC_GET_TYPE_ABORT_NOOP
+       if (lst->type) (void)_talloc_get_type_abort(data, lst->type, __location__);
+#endif
+
        if (is_bucket(lst, stack_index)) {
                bucket_add(lst, stack_index, data);
                return;