From: Arran Cudbard-Bell Date: Sat, 6 Mar 2021 22:01:16 +0000 (+0000) Subject: Ensure all fields in dl_symbol_free_t are initialised X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69475ff525e50399ed64fbbc87b876b2c0aef5d0;p=thirdparty%2Ffreeradius-server.git Ensure all fields in dl_symbol_free_t are initialised --- diff --git a/src/lib/util/dl.c b/src/lib/util/dl.c index 94c5683e48c..dbedc6277c1 100644 --- a/src/lib/util/dl.c +++ b/src/lib/util/dl.c @@ -49,8 +49,6 @@ RCSID("$Id$") # define RTLD_LOCAL (0) #endif - - /** Symbol dependent initialisation callback * * Call this function when the dl is loaded for the first time. @@ -375,10 +373,12 @@ int dl_symbol_free_cb_register(dl_loader_t *dl_loader, unsigned int priority, n = talloc(dl_loader, dl_symbol_free_t); if (!n) return -1; - n->priority = priority; - n->symbol = symbol; - n->func = func; - n->ctx = ctx; + *n = (dl_symbol_free_t){ + .priority = priority, + .symbol = symbol, + .func = func, + .ctx = ctx + }; while ((p = fr_dlist_next(&dl_loader->sym_free, p)) && (p->priority >= priority)); if (p) {