  {
  	ExtensionBlock	*ep;
  
-@@ -129,7 +131,7 @@ AddExtensionBlockMono(SavedImage *New, int Len, BYTE ExtData[])
+@@ -129,7 +131,7 @@
  
  	if (ExtData) {
  		memcpy(ep->Bytes, ExtData, Len);

 		
 	if (!fp) {
 		return FileNotFound;
@@ -848,8 +868,15 @@ gdip_save_gif_image (void *stream, GpImage *image, BOOL from_file)
 						Buffer[0] = 1;
 						Buffer[1] = ptr[0];
 						Buffer[2] = ptr[1];

 	if (gif == NULL) {
 		goto error;
 	}
@@ -581,7 +590,7 @@
 	}
 
 	FreeExtensionMono(&global_extensions);
-	DGifCloseFile (gif);
+	DGifCloseFile (gif, NULL);
 
 	*image = result;
 	return Ok;
@@ -597,7 +606,7 @@
 
 	if (gif != NULL) {
 		FreeExtensionMono (&global_extensions);
-		DGifCloseFile (gif);
+		DGifCloseFile (gif, NULL);
 	}
 
 	*image = NULL;
@@ -660,11 +669,22 @@
 		return InvalidParameter;
 	}
 
