[master] 2f4a74f Free memory before exit in test program
Martin Blix Grydeland
martin at varnish-cache.org
Tue Oct 1 14:48:19 CEST 2013
commit 2f4a74f678720df04e828a5a9bed6c670b3aa3fa
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Wed Sep 25 16:35:44 2013 +0200
Free memory before exit in test program
This to silence valgrind errors
diff --git a/lib/libvarnishapi/vxp_test.c b/lib/libvarnishapi/vxp_test.c
index 19be714..d4a8b4c 100644
--- a/lib/libvarnishapi/vxp_test.c
+++ b/lib/libvarnishapi/vxp_test.c
@@ -30,12 +30,15 @@ main(int argc, char **argv)
if (vex == NULL) {
VSB_finish(vsb);
fprintf(stderr, "Error:\n%s", VSB_data(vsb));
+ VSB_delete(vsb);
+ free(s);
exit(1);
}
VSB_delete(vsb);
vex_Free(&vex);
AZ(vex);
+ free(s);
return (0);
}
More information about the varnish-commit
mailing list