Skip to content

Commit f6512fc

Browse files
Fix leak of test context when test registration is skipped (#1058)
1 parent 1d7229f commit f6512fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libmongoc/tests/TestSuite.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,9 @@ _V_TestSuite_AddFull (TestSuite *suite,
319319
Test *iter;
320320

321321
if (suite->ctest_run && (0 != strcmp (suite->ctest_run, name))) {
322+
if (dtor) {
323+
dtor (ctx);
324+
}
322325
return NULL;
323326
}
324327

0 commit comments

Comments
 (0)