From: Aurelien Aptel Date: Tue, 17 Jan 2017 13:39:03 +0000 (+0100) Subject: s3/winbindd: fix invalid free X-Git-Tag: talloc-2.1.9~371 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca5d36d8425d7b173b977ff4fd02d057a7e23d44;p=thirdparty%2Fsamba.git s3/winbindd: fix invalid free coverity fix. TALLOC_FREE() might be called on uninitialized 'rids' at the end of the function in case of an early error. Initialize it to NULL to turn the TALLOC_FREE() to a noop in this case. Signed-off-by: Aurelien Aptel Reviewed-by: Volker Lendecke Reviewed-by: David Disseldorp Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Wed Jan 18 17:19:39 CET 2017 on sn-devel-144 --- diff --git a/source3/winbindd/winbindd_msrpc.c b/source3/winbindd/winbindd_msrpc.c index 0d0e4ca6506..5ace4d1c0bd 100644 --- a/source3/winbindd/winbindd_msrpc.c +++ b/source3/winbindd/winbindd_msrpc.c @@ -53,7 +53,7 @@ static NTSTATUS msrpc_query_user_list(struct winbindd_domain *domain, { struct rpc_pipe_client *samr_pipe = NULL; struct policy_handle dom_pol; - uint32_t *rids; + uint32_t *rids = NULL; TALLOC_CTX *tmp_ctx; NTSTATUS status;