s4:ldap_server: use talloc_zero() in ldapsrv_init_reply()
authorStefan Metzmacher <metze@samba.org>
Thu, 11 May 2017 17:07:04 +0000 (19:07 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 15 Jun 2017 07:13:22 +0000 (09:13 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/ldap_server/ldap_backend.c

index 1f0c7afdd911c7a028aaea5bd1158343c6f5def0..5e8ce6482339725d4cb8bf24597a23f3794c306f 100644 (file)
@@ -237,11 +237,11 @@ struct ldapsrv_reply *ldapsrv_init_reply(struct ldapsrv_call *call, uint8_t type
 {
        struct ldapsrv_reply *reply;
 
-       reply = talloc(call, struct ldapsrv_reply);
+       reply = talloc_zero(call, struct ldapsrv_reply);
        if (!reply) {
                return NULL;
        }
-       reply->msg = talloc(reply, struct ldap_message);
+       reply->msg = talloc_zero(reply, struct ldap_message);
        if (reply->msg == NULL) {
                talloc_free(reply);
                return NULL;