Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/external/mit/expat/dist/tests/minicheck.c,v rcsdiff: /ftp/cvs/cvsroot/src/external/mit/expat/dist/tests/minicheck.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.1.1.1.20.2 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1.20.2 -r1.1.1.2 --- src/external/mit/expat/dist/tests/minicheck.c 2017/06/21 17:23:43 1.1.1.1.20.2 +++ src/external/mit/expat/dist/tests/minicheck.c 2017/02/04 10:16:13 1.1.1.2 @@ -63,7 +63,10 @@ tcase_add_test(TCase *tc, tcase_test_fun size_t new_size = sizeof(tcase_test_function) * nalloc; tcase_test_function *new_tests = realloc(tc->tests, new_size); assert(new_tests != NULL); - tc->tests = new_tests; + if (new_tests != tc->tests) { + free(tc->tests); + tc->tests = new_tests; + } tc->allocated = nalloc; } tc->tests[tc->ntests] = test;