From: Stefan Metzmacher Date: Fri, 16 Feb 2018 15:13:16 +0000 (+0100) Subject: winbind: cleanup winbindd_cli_state->pwent_state if winbindd_getpwent_recv() returns... X-Git-Tag: ldb-1.3.2~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b158d4e4c1c3fee0a8884bc5e8f0c5a5ce49687f;p=thirdparty%2Fsamba.git winbind: cleanup winbindd_cli_state->pwent_state if winbindd_getpwent_recv() returns an error A client may skip the explicit endpwent() if getgrent() fails. This allows client_is_idle() return true in more cases. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13293 Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke --- diff --git a/source3/winbindd/winbindd_getpwent.c b/source3/winbindd/winbindd_getpwent.c index d33f5f9864f..9e5190a3c60 100644 --- a/source3/winbindd/winbindd_getpwent.c +++ b/source3/winbindd/winbindd_getpwent.c @@ -124,6 +124,7 @@ NTSTATUS winbindd_getpwent_recv(struct tevent_req *req, NTSTATUS status; if (tevent_req_is_nterror(req, &status)) { + TALLOC_FREE(state->cli->pwent_state); DEBUG(5, ("getpwent failed: %s\n", nt_errstr(status))); return status; }