]> git.sur5r.net Git - openldap/commitdiff
make sure so is correctly initialized (spotted by valgrind, possibly related to ITS...
authorPierangelo Masarati <ando@openldap.org>
Sat, 18 Sep 2010 18:27:28 +0000 (18:27 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 18 Sep 2010 18:27:28 +0000 (18:27 +0000)
servers/slapd/overlays/sssvlv.c

index 5f38e55c6e539dc059d4925e97ac8243e409f652..e3ca1a17f31820259caf26c8647dccff773a959d 100644 (file)
@@ -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;