mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 05:48:18 +00:00
Free memory after we are done with it.
This commit is contained in:
parent
247f7acaaf
commit
b08a96eea7
@ -372,6 +372,7 @@ my_execve(const char *path, char *const argv[], char *const envp[])
|
||||
nargv[1] = (char *)path;
|
||||
memcpy(nargv + 2, argv + 1, argc * sizeof(char *));
|
||||
execve(_PATH_BSHELL, nargv, envp);
|
||||
efree(nargv);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@ -825,6 +826,12 @@ io_error:
|
||||
}
|
||||
}
|
||||
}
|
||||
efree(fdsr);
|
||||
efree(fdsw);
|
||||
while ((iob = iobufs) != NULL) {
|
||||
iobufs = iobufs->next;
|
||||
efree(iob);
|
||||
}
|
||||
|
||||
return cstat->type == CMD_ERRNO ? -1 : 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user