[tracker: 26/30] extract,mp3: Plug a leak



commit 2de3acb5130d02a7bb3a5981d7fbd1ff8a7dce6c
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Jan 20 20:13:46 2014 +0100

    extract,mp3: Plug a leak
    
    Those loops bail out because the variable word hasn't been found to
    contain non-blank characters, but it still may point out to strings
    like "", so ensure that memory is freed.

 src/tracker-extract/tracker-extract-mp3.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index 99039dc..04084e4 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -1294,6 +1294,7 @@ get_id3v24_tags (id3v24frame           frame,
                        g_strstrip (word);
                } else {
                        /* Can't do anything without word. */
+                       g_free (word);
                        break;
                }
 
@@ -1485,6 +1486,7 @@ get_id3v23_tags (id3v24frame           frame,
                        g_strstrip (word);
                } else {
                        /* Can't do anything without word. */
+                       g_free (word);
                        break;
                }
 


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