Free envvar and args in pass_info in the oom case

This commit is contained in:
Christian Dywan 2010-07-20 12:50:23 +02:00 committed by Will Thompson
parent 4510983f13
commit b1f947da1a

View 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])