nbt: don't reference the event_ctx in nbtsock
authorAndrew Tridgell <tridge@samba.org>
Sun, 7 Feb 2010 10:08:56 +0000 (21:08 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 8 Feb 2010 00:04:59 +0000 (11:04 +1100)
This causes talloc_free with references errors

libcli/nbt/nbtsocket.c

index a3e295d3df0489bdf63a233e759b9a76ef786753..d9bc72e49982874d4d323ec359d2cc5478d54b63 100644 (file)
@@ -341,7 +341,7 @@ _PUBLIC_ struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
        nbtsock = talloc(mem_ctx, struct nbt_name_socket);
        if (nbtsock == NULL) goto failed;
 
-       nbtsock->event_ctx = talloc_reference(nbtsock, event_ctx);
+       nbtsock->event_ctx = event_ctx;
        if (nbtsock->event_ctx == NULL) goto failed;
 
        status = socket_create("ip", SOCKET_TYPE_DGRAM, &nbtsock->sock, 0);