From: Pierangelo Masarati Date: Sat, 18 Sep 2010 18:27:28 +0000 (+0000) Subject: make sure so is correctly initialized (spotted by valgrind, possibly related to ITS... X-Git-Tag: MIGRATION_CVS2GIT~476 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dc78654c0b53eb3e623d7aa5872524bbe46a4efb;p=openldap make sure so is correctly initialized (spotted by valgrind, possibly related to ITS#6649) --- diff --git a/servers/slapd/overlays/sssvlv.c b/servers/slapd/overlays/sssvlv.c index 5f38e55c6e..e3ca1a17f3 100644 --- a/servers/slapd/overlays/sssvlv.c +++ b/servers/slapd/overlays/sssvlv.c @@ -801,9 +801,9 @@ static int sssvlv_op_search( op->o_tmpmemctx ); /* Install serversort response callback to handle a new search */ if ( ps || vc ) { - so = ch_malloc( sizeof(sort_op)); + so = ch_calloc( 1, sizeof(sort_op)); } else { - so = op->o_tmpalloc( sizeof(sort_op), op->o_tmpmemctx ); + so = op->o_tmpcalloc( 1, sizeof(sort_op), op->o_tmpmemctx ); } sort_conns[op->o_conn->c_conn_idx] = so;