s4:finddcs_cldap: talloc free old memory before allocating a new netlogon struct
authorStefan Metzmacher <metze@samba.org>
Sat, 22 Oct 2011 01:09:59 +0000 (03:09 +0200)
committerStefan Metzmacher <metze@samba.org>
Sat, 22 Oct 2011 02:55:53 +0000 (04:55 +0200)
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Oct 22 04:55:54 CEST 2011 on sn-devel-104

source4/libcli/finddcs_cldap.c

index 6dd0a2f1a65c91e0f991702a6e438885c68cad97..8199e375109934fa730bb6b48303fd9cac5bd824 100644 (file)
@@ -227,6 +227,7 @@ static void finddcs_cldap_next_server(struct finddcs_cldap_state *state)
                return;
        }
 
+       TALLOC_FREE(state->netlogon);
        state->netlogon = talloc_zero(state, struct cldap_netlogon);
        if (tevent_req_nomem(state->netlogon, state->req)) {
                return;