]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Explicitly free more things
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 5 Nov 2019 16:10:57 +0000 (10:10 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 5 Nov 2019 16:10:57 +0000 (10:10 -0600)
src/bin/unit_test_attribute.c

index f069a02f5b3e1926bca8e8f1fd455e478d8f4d2a..000c0f75e027be4826b0ee9cae25dd34026d2da3 100644 (file)
@@ -2337,7 +2337,8 @@ int main(int argc, char *argv[])
         *      memory, so we get clean talloc reports.
         */
 cleanup:
-       if (dl_modules) talloc_free(dl_modules);
+       talloc_free(dl_modules);
+       talloc_free(dl_loader);
        fr_dict_free(&dict);
        unlang_free();
        xlat_free();
@@ -2354,10 +2355,10 @@ cleanup:
        fr_strerror_free();
 
        /*
-        *      Explicitly free children to make
-        *      memory errors on exit less confusing.
+        *      Explicitly free the autofree context
+        *      to make errors less confusing.
         */
-       talloc_free_children(autofree);
+       talloc_free(autofree);
 
        return ret;
 }