winbind: Fix Coverity ID 1398910
[metze/samba-autobuild/.git] / source3 / winbindd / winbindd_ads.c
index d7a665abbc6d6edf0db33da88fbd0fd226fc8266..7e572e5d41f48168925f8783947d253d76d2bc37 100644 (file)
@@ -449,6 +449,8 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
        rids = talloc_realloc(mem_ctx, rids, uint32_t, count);
        if (prids != NULL) {
                *prids = rids;
+       } else {
+               TALLOC_FREE(rids);
        }
 
        status = NT_STATUS_OK;