gnumeric r17192 - trunk/plugins/openoffice



Author: mortenw
Date: Thu Mar 12 21:01:42 2009
New Revision: 17192
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17192&view=rev

Log:
FMR fix.



Modified:
   trunk/plugins/openoffice/openoffice-read.c

Modified: trunk/plugins/openoffice/openoffice-read.c
==============================================================================
--- trunk/plugins/openoffice/openoffice-read.c	(original)
+++ trunk/plugins/openoffice/openoffice-read.c	Thu Mar 12 21:01:42 2009
@@ -2869,17 +2869,19 @@
 	 * potential of any funny business */
 	size = MIN (gsf_input_size (mimetype), 2048);
 	header = gsf_input_read (mimetype, size, NULL);
-	g_object_unref (mimetype);
 
 	if (header) {
 		unsigned ui;
 
 		for (ui = 0 ; ui < G_N_ELEMENTS (OOVersions) ; ui++)
 			if (size == strlen (OOVersions[ui].mime_type) &&
-			    !memcmp (OOVersions[ui].mime_type, header, size))
+			    !memcmp (OOVersions[ui].mime_type, header, size)) {
+				g_object_unref (mimetype);
 				return OOVersions[ui].version;
+			}
 	}
 
+	g_object_unref (mimetype);
 	return OOO_VER_UNKNOWN;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]