From: Marcela Mašláňová Date: Mon, 21 Feb 2011 12:33:08 +0000 (+0100) Subject: Comment not freeing mailfrom - found during code review. X-Git-Tag: cronie1.4.7~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e81d18601caac7e88fd3632ff99ca485accbda3f;p=cronie Comment not freeing mailfrom - found during code review. --- diff --git a/src/do_command.c b/src/do_command.c index 744427c..5415e05 100644 --- a/src/do_command.c +++ b/src/do_command.c @@ -372,6 +372,9 @@ static void child_process(entry * e, user * u) { /* get sender address. this is MAILFROM if set (and safe), * root otherwise. + * mailfrom is not freed because it lives only in this short + * child process. Freeing could lead to segfaul, when mailfrom + * is acquired from env_get function. */ if (!mailfrom || !*mailfrom || !safe_p(usernm, mailfrom)) { mailfrom = calloc(5, sizeof (char));