]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
the underlying "da" may have already been freed
authorAlan T. DeKok <aland@freeradius.org>
Sun, 23 Feb 2025 12:49:50 +0000 (07:49 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 23 Feb 2025 12:49:50 +0000 (07:49 -0500)
if it was re-written

src/lib/util/dict_tokenize.c

index 8762fbe637e69f343658ca578af00d51ebc662c2..6e9136b83e2e95a380e54f96f591d29502bcb2a2 100644 (file)
@@ -1025,7 +1025,7 @@ static int dict_read_process_common(dict_tokenize_ctx_t *dctx, fr_dict_attr_t **
         */
        if (dict_process_type_field(dctx, type_name, &da) < 0) {
        error:
-               talloc_free(to_free);
+               if (da == to_free) talloc_free(to_free);
                return -1;
        }