[PATCH v1 2/2] s3/winbindd: fix invalid free
Aurelien Aptel
aaptel at suse.com
Tue Jan 17 13:39:03 UTC 2017
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 at suse.com>
---
source3/winbindd/winbindd_msrpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source3/winbindd/winbindd_msrpc.c b/source3/winbindd/winbindd_msrpc.c
index 0d0e4ca..5ace4d1 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;
--
2.10.2
More information about the samba-technical
mailing list