r13506: zero memory as some ASN.1 elements are optional, and we should initialize
authorStefan Metzmacher <metze@samba.org>
Wed, 15 Feb 2006 13:33:33 +0000 (13:33 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:51:56 +0000 (13:51 -0500)
them for the internal use...

found by 'make valgrindtest'

metze
(This used to be commit 1db9501c5261a974c6da1938537c7991ff6cfefd)

source4/libcli/ldap/ldap_controls.c

index f85e4843c1ad2bd3fade9ba444f6fe1796770a21..4a28fa510be9838d6486a6efe7b40e87cc90bb6d 100644 (file)
@@ -98,7 +98,7 @@ static BOOL decode_server_sort_request(void *mem_ctx, DATA_BLOB in, void **out)
                if (!lssc) {
                        return False;
                }
-               lssc[num] = talloc(lssc, struct ldb_server_sort_control);
+               lssc[num] = talloc_zero(lssc, struct ldb_server_sort_control);
                if (!lssc[num]) {
                        return False;
                }