[Pkg-telepathy-commits] [telepathy-gabble] 06/11: plugin-loader: clear GError after g_dir_open fails

Simon McVittie smcv at debian.org
Thu Mar 20 10:33:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-gabble.

commit 226f1eae705a3c05715b4213fbff5b05b995af5e
Author: Will Thompson <will.thompson at collabora.co.uk>
Date:   Sat Jun 22 19:16:55 2013 +0100

    plugin-loader: clear GError after g_dir_open fails
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66085
    Reviewed-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
---
 src/plugin-loader.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/plugin-loader.c b/src/plugin-loader.c
index d308437..2e14c07 100644
--- a/src/plugin-loader.c
+++ b/src/plugin-loader.c
@@ -108,7 +108,6 @@ plugin_loader_try_to_load (
 static void
 gabble_plugin_loader_probe (GabblePluginLoader *self)
 {
-  GError *error = NULL;
   const gchar *directory_names = g_getenv ("GABBLE_PLUGIN_DIR");
   gchar **dir_array;
   gchar **ptr;
@@ -132,13 +131,15 @@ gabble_plugin_loader_probe (GabblePluginLoader *self)
 
   for (ptr = dir_array ; *ptr != NULL ; ptr++)
     {
+      GError *error = NULL;
+
       DEBUG ("probing %s", *ptr);
       d = g_dir_open (*ptr, 0, &error);
 
       if (d == NULL)
         {
           DEBUG ("%s", error->message);
-          g_error_free (error);
+          g_clear_error (&error);
           continue;
         }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-gabble.git



More information about the Pkg-telepathy-commits mailing list