2007-01-08 [paul] 2.7.0cvs1
authorColin Leroy <colin@colino.net>
Mon, 8 Jan 2007 12:08:36 +0000 (12:08 +0000)
committerColin Leroy <colin@colino.net>
Mon, 8 Jan 2007 12:08:36 +0000 (12:08 +0000)
* src/prefs_themes.c
* src/common/utils.c
Fix resource leaks

ChangeLog
PATCHSETS
configure.ac
src/common/utils.c
src/prefs_themes.c

index 7fdab770d8a166d25dc35659a3566e367281c744..8d4dc39ad55415d9bab8e2b97c02bc041dc76559 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-08 [paul]      2.7.0cvs1
+
+       * src/prefs_themes.c
+       * src/common/utils.c
+               Fix resource leaks
+
 2007-01-08 [paul]      2.7.0
 
        * NEWS
index 829b0c6343bafd11afd16e09428bb096a2ae982f..21ccd149b554b8ed8ca6b2d2aefddac1635f9235 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.10 -r 1.1.2.11 po/ca.po;  cvs diff -u -r 1.58.2.28 -r 1.58.2.29 po/de.po;  cvs diff -u -r 1.12.2.12 -r 1.12.2.13 po/en_GB.po;  cvs diff -u -r 1.1.2.11 -r 1.1.2.12 po/fi.po;  cvs diff -u -r 1.34.2.21 -r 1.34.2.22 po/it.po;  cvs diff -u -r 1.50.2.22 -r 1.50.2.23 po/pt_BR.po;  cvs diff -u -r 1.2.2.23 -r 1.2.2.24 po/sk.po;  cvs diff -u -r 1.17.2.24 -r 1.17.2.25 po/sr.po;  cvs diff -u -r 1.5.2.20 -r 1.5.2.21 po/zh_CN.po;  ) > 2.6.1cvs117.patchset
 ( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 doc/man/claws-mail.1;  cvs diff -u -r 1.1.2.37 -r 1.1.2.38 manual/advanced.xml;  ) > 2.6.1cvs118.patchset
 ( cvs diff -u -r 1.1.2.3 -r 1.1.2.4 doc/man/claws-mail.1;  ) > 2.6.1cvs119.patchset
+( cvs diff -u -r 1.3.2.46 -r 1.3.2.47 src/prefs_themes.c;  cvs diff -u -r 1.36.2.94 -r 1.36.2.95 src/common/utils.c;  ) > 2.7.0cvs1.patchset
index 8d1cc588433d54d21347f3459ee3afd66e7528b4..7f160ae24af0fb2e8e14c0d270111d8141e33801 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=7
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=0
+EXTRA_VERSION=1
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index c9dfa6041ac21c04a3ef86cb32feee18fcda1300..533c1f93bd232b0f761620bff4aafad6f04667da 100644 (file)
@@ -4710,8 +4710,10 @@ gint copy_dir(const gchar *src, const gchar *dst)
                debug_print("copying: %s -> %s\n", old_file, new_file);
                if (g_file_test(old_file, G_FILE_TEST_IS_REGULAR)) {
                        gint r = copy_file(old_file, new_file, TRUE);
-                       if (r < 0)
+                       if (r < 0) {
+                               g_dir_close(dir);
                                return r;
+                       }
                } else if (g_file_test(old_file, G_FILE_TEST_IS_SYMLINK)) {
                        GError *error;
                        gint r = 0;
@@ -4719,14 +4721,19 @@ gint copy_dir(const gchar *src, const gchar *dst)
                        if (target)
                                r = symlink(target, new_file);
                        g_free(target);
-                       if (r < 0)
+                       if (r < 0) {
+                               g_dir_close(dir);
                                return r;
+                       }
                } else if (g_file_test(old_file, G_FILE_TEST_IS_DIR)) {
                        gint r = copy_dir(old_file, new_file);
-                       if (r < 0)
+                       if (r < 0) {
+                               g_dir_close(dir);
                                return r;
+                       }
                }
        }
+       g_dir_close(dir);
        return 0;
 }
 
index ddce4add7f4883467f0086eb8b1824a02628adeb..77d48fc481bd267b2a8d5203035dbd66bd457dea 100644 (file)
@@ -245,7 +245,8 @@ static void prefs_themes_foreach_file(const gchar *dirname, const FileFunc func,
                (*func)(fullentry, data);
                
                g_free(fullentry);
-       }       
+       }
+       closedir(dp);
 }
 
 static gboolean prefs_themes_is_system_theme(const gchar *dirname)