Replace more long-lived contexts with talloc_autofree_context().
authorJeremy Allison <jra@samba.org>
Fri, 17 Jul 2009 01:14:56 +0000 (18:14 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 17 Jul 2009 01:14:56 +0000 (18:14 -0700)
Jeremy.

source3/lib/ctdbd_conn.c
source3/libsmb/spnego.c

index dde377581b93ed601ab97b45c6a78642dc96fb79..449e049ffa26093cf254e0c5af639aa712967b99 100644 (file)
@@ -358,7 +358,7 @@ static NTSTATUS ctdb_read_req(struct ctdbd_connection *conn, uint32 reqid,
                        goto next_pkt;
                }
 
-               if (!(msg_state = TALLOC_P(NULL, struct deferred_msg_state))) {
+               if (!(msg_state = TALLOC_P(talloc_autofree_context(), struct deferred_msg_state))) {
                        DEBUG(0, ("talloc failed\n"));
                        TALLOC_FREE(hdr);
                        goto next_pkt;
index ee2c3c3d5a7ac646b8641a6a832f88004334feb8..3fa9559cfb1aab06ad90c5e72d3ae488bd0d4450 100644 (file)
@@ -41,7 +41,7 @@ static bool read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
                        asn1_start_tag(asn1, ASN1_CONTEXT(0));
                        asn1_start_tag(asn1, ASN1_SEQUENCE(0));
 
-                       token->mechTypes = TALLOC_P(NULL, const char *);
+                       token->mechTypes = TALLOC_P(talloc_autofree_context(), const char *);
                        for (i = 0; !asn1->has_error &&
                                     0 < asn1_tag_remaining(asn1); i++) {
                                const char *p_oid = NULL;