[tracker/tracker-0.6] Plug leak in libinotify. Noticed by Martyn.



commit 38be004ee9a80e980ca88c692b35331bcad01e06
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Jun 25 16:17:39 2009 +0200

    Plug leak in libinotify. Noticed by Martyn.

 src/libinotify/inotify-monitor.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/libinotify/inotify-monitor.c b/src/libinotify/inotify-monitor.c
index 542105e..9bbcb73 100644
--- a/src/libinotify/inotify-monitor.c
+++ b/src/libinotify/inotify-monitor.c
@@ -327,7 +327,7 @@ inotify_monitor_add( const char *filename, guint32 mask, unsigned long flags,
   }
   else
   {
-    const char *parent = g_path_get_dirname( filename );
+    char *parent = g_path_get_dirname( filename );
     unsigned long lflags;
     guint32 lmask;
 
@@ -346,6 +346,7 @@ inotify_monitor_add( const char *filename, guint32 mask, unsigned long flags,
     /* This will be filtered out if it shouldn't be delivered. */
     inotify_handle_invoke_callback( inh, NULL, IN_DELETE | IN_SYNTHETIC, -1 );
 
+    g_free (parent);
     result = 0;
   }
 



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