Diff of /image_utils.c [715af3] .. [773e1f] Maximize Restore

  Switch to side-by-side view

--- a/image_utils.c
+++ b/image_utils.c
@@ -26,6 +26,7 @@
  * The resize functions come from the resize_image project, at http://www.golac.fr/Image-Resizer
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -33,7 +34,11 @@
 #include <sys/types.h>
 #include <setjmp.h>
 #include <jpeglib.h>
+#ifdef HAVE_MACHINE_ENDIAN_H
+#include <machine/endian.h>
+#else
 #include <endian.h>
+#endif
 
 #include "upnpreplyparse.h"
 #include "image_utils.h"
@@ -380,8 +385,7 @@
 		}
 	}
 	fclose(img);
-	if( data )
-		free(data);
+	free(data);
 	return ret;
 }
 
@@ -463,8 +467,7 @@
 			fclose(file);
 		if( vimage )
 		{
-			if( vimage->buf )
-				free(vimage->buf);
+			free(vimage->buf);
 			free(vimage);
 		}
 		return NULL;