winbindd: Do an early TALLOC_FREE
authorVolker Lendecke <vl@samba.org>
Sat, 19 May 2018 16:31:17 +0000 (18:31 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 15 Jun 2018 23:06:36 +0000 (01:06 +0200)
Leave the if-block without leaking

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd_ping_dc.c

index c1a0a7b0ec691be7fcb3dc0a89519b0b801c2d14..374781902fd50b128b332d375a5031e811f27790 100644 (file)
@@ -70,6 +70,8 @@ struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
                        }
 
                        state->dcname = talloc_asprintf(state, "%s.%s", h, d);
+                       TALLOC_FREE(h);
+
                        if (tevent_req_nomem(state->dcname, req)) {
                                return tevent_req_post(req, ev);
                        }