]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[test] Fix memory leak in settings self-tests
authorMichael Brown <mcb30@ipxe.org>
Thu, 3 May 2012 14:24:01 +0000 (15:24 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 4 May 2012 14:15:34 +0000 (15:15 +0100)
Detected using Valgrind.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/tests/settings_test.c

index ccc2694bbddf6eb7d17809fed8b7d01cca3ebe77..ac4abee48c356cbc8cfd5efbed3fbac419743694 100644 (file)
@@ -267,7 +267,8 @@ static void settings_test_exec ( void ) {
                          0x7a, 0x7c, 0xfe, 0x4f, 0xca, 0x4a, 0x57 ),
                    "1a6a749d-0eda-461a-a87a-7cfe4fca4a57" );
 
-       /* Unregister test settings block */
+       /* Clear and unregister test settings block */
+       clear_settings ( &test_settings );
        unregister_settings ( &test_settings );
 }