From dc78654c0b53eb3e623d7aa5872524bbe46a4efb Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 18 Sep 2010 18:27:28 +0000 Subject: [PATCH] make sure so is correctly initialized (spotted by valgrind, possibly related to ITS#6649) --- servers/slapd/overlays/sssvlv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5