s3-passdb: Make sure we don't call free on a garbage pointer.
authorAndreas Schneider <asn@samba.org>
Mon, 28 Jun 2010 08:58:08 +0000 (10:58 +0200)
committerAndreas Schneider <asn@samba.org>
Mon, 28 Jun 2010 10:56:13 +0000 (12:56 +0200)
Found by clang-analyzer.

source3/passdb/pdb_ads.c

index 722bfacfb17531efe6740f9581a29b88630d3a7f..c5d8cc2c02dbef4feb033b78bdf882905195e788 100644 (file)
@@ -1536,7 +1536,7 @@ static NTSTATUS pdb_ads_enum_alias_memberships(struct pdb_methods *m,
        struct pdb_ads_state *state = talloc_get_type_abort(
                m->private_data, struct pdb_ads_state);
        const char *attrs[1] = { "objectSid" };
-       struct tldap_message **msg;
+       struct tldap_message **msg = NULL;
        uint32_t *alias_rids = NULL;
        size_t num_alias_rids = 0;
        int i, rc, count;