瀏覽代碼

Fix a leak in test_microdesc (CID 1311631)

Nick Mathewson 9 年之前
父節點
當前提交
8507d75c82
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/test/test_microdesc.c

+ 1 - 1
src/test/test_microdesc.c

@@ -834,10 +834,10 @@ test_md_corrupt_desc(void *arg)
                                cp, cp+strlen(cp),
                                SAVED_IN_JOURNAL, 0, time(NULL), NULL);
   tt_int_op(smartlist_len(sl), ==, 0);
-  smartlist_free(sl);
 
  done:
   tor_free(cp);
+  smartlist_free(sl);
 }
 
 struct testcase_t microdesc_tests[] = {