ccdemos/image.c
branchpyrit
changeset 27 e9bb83c2b8b9
parent 15 a0a3e334744f
child 60 a23b5089b9c3
--- a/ccdemos/image.c	Fri Dec 07 14:59:14 2007 +0100
+++ b/ccdemos/image.c	Fri Dec 07 16:39:42 2007 +0100
@@ -81,6 +81,7 @@
 
 	if (setjmp(png_jmpbuf(png))) {
 		fclose(f);
+		png_destroy_info_struct(png, &pnginfo);
 		png_destroy_write_struct(&png, &pnginfo);
 		return (0);
 	}
@@ -106,6 +107,7 @@
 
 	/* ukoncit soubor a uvolnit pomocne struktury */
 	png_write_end(png, pnginfo);
+	png_destroy_info_struct(png, &pnginfo);
 	png_destroy_write_struct(&png, 0);
 
 	fclose(f);