]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/winbindd: fix invalid free
authorAurelien Aptel <aaptel@suse.com>
Tue, 17 Jan 2017 13:39:03 +0000 (14:39 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 18 Jan 2017 16:19:39 +0000 (17:19 +0100)
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 <aaptel@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan 18 17:19:39 CET 2017 on sn-devel-144

source3/winbindd/winbindd_msrpc.c

index 0d0e4ca6506579357bdc3ad055fe99c443c7d8e6..5ace4d1c0bd274bb0c4420c71c0511d9f59d5521 100644 (file)
@@ -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;