From: Howard Chu Date: Wed, 24 Sep 2003 03:03:53 +0000 (+0000) Subject: Silence valgrind warnings of uninit'd memory X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~661 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ece76c067f213aed7edfd835127cad95f19096ea;p=openldap Silence valgrind warnings of uninit'd memory --- diff --git a/servers/slapd/back-bdb/add.c b/servers/slapd/back-bdb/add.c index 67b04cc6d5..14fa8bd477 100644 --- a/servers/slapd/back-bdb/add.c +++ b/servers/slapd/back-bdb/add.c @@ -506,6 +506,7 @@ retry: /* transaction retry */ } else { char gid[DB_XIDDATASIZE]; + memset( gid, 0, sizeof(gid) ); snprintf( gid, sizeof( gid ), "%s-%08lx-%08lx", bdb_uuid.bv_val, (long) op->o_connid, (long) op->o_opid ); diff --git a/servers/slapd/back-bdb/modrdn.c b/servers/slapd/back-bdb/modrdn.c index 93150525f7..ba0502f207 100644 --- a/servers/slapd/back-bdb/modrdn.c +++ b/servers/slapd/back-bdb/modrdn.c @@ -960,6 +960,7 @@ retry: /* transaction retry */ } else { char gid[DB_XIDDATASIZE]; + memset( gid, 0, sizeof(gid) ); snprintf( gid, sizeof( gid ), "%s-%08lx-%08lx", bdb_uuid.bv_val, (long) op->o_connid, (long) op->o_opid );