Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


On Thu, Nov 25, 2010 at 11:30:20PM +0100, Julien Nabet wrote:
Hello,

Here's a small patch for shell/source/unix/misc/gnome-open-url.c

Julien.
(LGPLv3+ / MPL)

commit 6b768a031280d0c3ad23624dd3a6470c57395a56
Author: serval <serval@ilapharm.com>
Date:   Thu Nov 25 23:26:39 2010 +0100

    correct cppcheck, Memory leak: fallback

diff --git a/shell/source/unix/misc/gnome-open-url.c b/shell/source/unix/misc/gnome-open-url.c
index 69cd837..9ee106b 100644
--- a/shell/source/unix/misc/gnome-open-url.c
+++ b/shell/source/unix/misc/gnome-open-url.c
@@ -139,6 +139,7 @@ int main(int argc, char *argv[] )
         args[2] = NULL;
         return execv(fallback, args);
     }
+    free(fallback);
         
     return -1;  
 }

I changed the code a bit so fallback is freed even if the "if" path is
taken.

D.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.