瀏覽代碼

[test] Fix memory leak in settings self-tests

Detected using Valgrind.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 年之前
父節點
當前提交
69fa29029c
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      src/tests/settings_test.c

+ 2
- 1
src/tests/settings_test.c 查看文件

@@ -267,7 +267,8 @@ static void settings_test_exec ( void ) {
267 267
 			  0x7a, 0x7c, 0xfe, 0x4f, 0xca, 0x4a, 0x57 ),
268 268
 		    "1a6a749d-0eda-461a-a87a-7cfe4fca4a57" );
269 269
 
270
-	/* Unregister test settings block */
270
+	/* Clear and unregister test settings block */
271
+	clear_settings ( &test_settings );
271 272
 	unregister_settings ( &test_settings );
272 273
 }
273 274
 

Loading…
取消
儲存