[gthumb] Removed some unused code and fixed a file descriptor leak



commit 7e2835d7704343cce42f1512d228b373d8136b9a
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Tue Jun 16 13:10:14 2009 -0400

    Removed some unused code and fixed a file descriptor leak

 libgthumb/file-utils.c   |   13 -------------
 libgthumb/file-utils.h   |    2 --
 libgthumb/pixbuf-utils.c |    1 +
 3 files changed, 1 insertions(+), 15 deletions(-)
---
diff --git a/libgthumb/file-utils.c b/libgthumb/file-utils.c
index 074a1e7..e2597c3 100644
--- a/libgthumb/file-utils.c
+++ b/libgthumb/file-utils.c
@@ -557,19 +557,6 @@ gboolean mime_type_is_image (const char *mime_type)
 }
 
 
-gboolean file_is_image (const gchar *name,
-			gboolean     fast_file_type)
-{
-	const char *mime_type = NULL;
-
-	mime_type = get_file_mime_type (name, fast_file_type);
-	if (mime_type == NULL)
-		return FALSE;
-
-	return mime_type_is_image (mime_type);
-}
-
-
 gboolean mime_type_is_video (const char *mime_type)
 {
 	g_return_val_if_fail (mime_type != NULL, FALSE);
diff --git a/libgthumb/file-utils.h b/libgthumb/file-utils.h
index 9a54edc..2d0af59 100644
--- a/libgthumb/file-utils.h
+++ b/libgthumb/file-utils.h
@@ -112,8 +112,6 @@ gboolean            visit_rc_directory_sync       (const char       *rc_dir,
 gboolean	    mime_type_is_image	          (const char       *mime_type);
 gboolean            mime_type_is_video            (const char       *mime_type);
 gboolean            mime_type_is_audio            (const char       *mime_type);
-gboolean	    file_is_image 		  (const gchar      *name,
-						   gboolean          fast_file_type);
 gboolean            file_is_image_video_or_audio  (const gchar      *name,
                                                    gboolean          fast_file_type);
 gboolean            file_is_hidden                (const char       *name);
diff --git a/libgthumb/pixbuf-utils.c b/libgthumb/pixbuf-utils.c
index 2dc3f4c..c75e88b 100644
--- a/libgthumb/pixbuf-utils.c
+++ b/libgthumb/pixbuf-utils.c
@@ -1150,6 +1150,7 @@ _gdk_pixbuf_save_as_tga (GdkPixbuf   *pixbuf,
                              GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
 			     "Couldn't allocate memory for writing TGA file '%s'",
 			     filename);
+		fclose (fp);
 		return FALSE;
 	}
 



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