[easytag] Fix two memory leaks in main



commit 592da420246fb54699ced2a39b140e3da2a6a5ce
Author: David King <amigadave amigadave com>
Date:   Mon Feb 11 19:05:05 2013 +0000

    Fix two memory leaks in main

 src/easytag.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/easytag.c b/src/easytag.c
index a74119a..ff5264f 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -308,6 +308,8 @@ int main (int argc, char *argv[])
                 ps_index++;
             }
 
+            g_strfreev (pathsplit);
+
             // Check if file or directory
             resultstat = stat(path2check,&statbuf);
             if (resultstat==0 && S_ISDIR(statbuf.st_mode))       // Directory
@@ -320,6 +322,7 @@ int main (int argc, char *argv[])
             }else
             {
                 g_print(_("Unknown parameter or path '%s'\n"),argv[1]);
+                g_free (path2check);
                 Display_Usage();
             }
             g_free(path2check);


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