From: Todd C. Miller Date: Fri, 7 May 2010 14:14:12 +0000 (-0400) Subject: Free memory after we are done with it. X-Git-Tag: SUDO_1_8_0~658 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b08a96eea7f6735b2e4587bca6be60b0e96462b9;p=sudo Free memory after we are done with it. --- diff --git a/src/script.c b/src/script.c index fd67c80cd..62731cc45 100644 --- a/src/script.c +++ b/src/script.c @@ -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; }