diff --git a/c/zalloc/zalloc_test.c b/c/zalloc/zalloc_test.c index 07d82f9..2da738b 100644 --- a/c/zalloc/zalloc_test.c +++ b/c/zalloc/zalloc_test.c @@ -36,10 +36,8 @@ int main(int argc, char *argv[]) } } - for (i = 0; i < nobj; i++) { - zfree(p[i]); - p[i] = NULL; - } + for (i = 0; i < nobj; i++) + zclear(&p[i]); printf("Success, iterations = %lu, nobj = %lu\n", iterations, nobj);