[Libreoffice-commits] .: shell/source

David Tardon dtardon at kemper.freedesktop.org
Thu Nov 25 21:33:01 PST 2010


 shell/source/unix/misc/gnome-open-url.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c50fe167cac0c475aa500f83300fd9c35f91865b
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Fri Nov 26 06:32:21 2010 +0100

    cppcheck, Memory leak

diff --git a/shell/source/unix/misc/gnome-open-url.c b/shell/source/unix/misc/gnome-open-url.c
index 69cd837..0c3058d 100644
--- a/shell/source/unix/misc/gnome-open-url.c
+++ b/shell/source/unix/misc/gnome-open-url.c
@@ -110,6 +110,7 @@ int main(int argc, char *argv[] )
     GError *error = NULL;
     char *fallback;
     char *index;
+    int retcode = -1;
     
     if( argc != 2 )
     {
@@ -137,12 +138,11 @@ int main(int argc, char *argv[] )
         args[0] = fallback;
         args[1] = argv[1];
         args[2] = NULL;
-        return execv(fallback, args);
+        retcode = execv(fallback, args);
     }
+    free(fallback);
         
-    return -1;  
+    return retcode;
 }
 
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list