diff -r e9afb5387007 -r 87b405d61f64 src/server/daemon/webserver.c --- a/src/server/daemon/webserver.c Tue Dec 27 14:02:28 2016 +0100 +++ b/src/server/daemon/webserver.c Tue Dec 27 17:19:00 2016 +0100 @@ -126,13 +126,11 @@ vars->Vuserpw = NULL; } } - free(pwbuf); if(!vars->Vuserpw) { log_ereport(LOG_WARN, "globalvars->Vuserpw is null"); } if(cfg->user.ptr) { - char *pwbuf = malloc(DEF_PWBUF); vars->Vuserpw = malloc(sizeof(struct passwd)); // open user database //setpwent(); @@ -144,9 +142,9 @@ free(vars->Vuserpw); vars->Vuserpw = NULL; } - free(pwbuf); //endpwent(); // TODO: close or not? } + free(pwbuf); // change uid if(vars->Vuserpw && ws_uid == 0) {