Free envvar and args in pass_info in the oom case
authorChristian Dywan <christian.dywan@lanedo.com>
Tue, 20 Jul 2010 10:50:23 +0000 (12:50 +0200)
committerWill Thompson <will.thompson@collabora.co.uk>
Tue, 5 Oct 2010 12:47:07 +0000 (13:47 +0100)
tools/dbus-launch.c

index 6fa9c92..ce9c7b1 100644 (file)
@@ -701,7 +701,11 @@ pass_info (const char *runprog, const char *bus_address, pid_t bus_pid,
       args = malloc (sizeof (char *) * ((argc-remaining_args)+2));
 
       if (envvar == NULL || args == NULL)
-        goto oom;
+        {
+          free (envvar);
+          free (args);
+          goto oom;
+        }
 
      args[0] = xstrdup (runprog);
       if (!args[0])