From: Thibault Godouet Date: Thu, 27 Dec 2012 17:48:11 +0000 (+0000) Subject: Fixed bug in change_user_setup_env() which could make fcron crash when sending a... X-Git-Tag: ver3_1_1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6510e70ae0fbe52af65447b8ec9654a0a816bc9;p=thirdparty%2Ffcron.git Fixed bug in change_user_setup_env() which could make fcron crash when sending a 'not run' email --- diff --git a/job.c b/job.c index 0e3b695..23df4c6 100644 --- a/job.c +++ b/job.c @@ -260,8 +260,8 @@ change_user_setup_env(struct cl_t *cl, setup_user_and_env(cl, pas, sendmailenv, jobenv, curshell, curhome, content_type, encoding); - become_user(cl, pas, *curhome); - Free_safe(*curhome); + + become_user(cl, pas, (curhome!=NULL)? *curhome : "/"); } void