]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Free slab element at the correct place
authorNick Porter <nick@portercomputing.co.uk>
Mon, 20 Feb 2023 17:40:32 +0000 (17:40 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 20 Feb 2023 17:41:47 +0000 (17:41 +0000)
src/lib/util/slab.h

index e6f3c1ab90ca59d2a42111573a524d2e9b6967af..2ed763452616fac9bcb6cfd9a0ffcf3523ddad41 100644 (file)
@@ -330,9 +330,9 @@ DIAG_OFF(unused-function) \
                                fr_ ## _name ## _slab_insert_tail(&slab_list->avail, slab); \
                        } \
                        slab_list->in_use--; \
+                       element->in_use = false; \
                        return; \
                } \
-               element->in_use = false; \
                talloc_free(element); \
        } \
 \