From 5ccf0bd16a962d407020062ce0fe90ad0d051f95 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 18 Feb 2007 11:11:57 +0000 Subject: r21421: Fix a memleak. This made tdb look considerably worse than necessary. Volker (This used to be commit 573ba38722e338fb4158dfda181308a1a736c5c0) --- source4/torture/local/dbspeed.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/torture/local') diff --git a/source4/torture/local/dbspeed.c b/source4/torture/local/dbspeed.c index 08012fc5e9..2dce343483 100644 --- a/source4/torture/local/dbspeed.c +++ b/source4/torture/local/dbspeed.c @@ -96,6 +96,7 @@ static BOOL test_tdb_speed(struct torture_context *torture, const void *_data) key.dptr = (uint8_t *)talloc_asprintf(tmp_ctx, "S-1-5-21-53173311-3623041448-2049097239-%u", i); key.dsize = strlen((char *)key.dptr)+1; data = tdb_fetch(tdbw->tdb, key); + talloc_free(key.dptr); if (data.dptr == NULL) { torture_result(torture, TORTURE_FAIL, "Failed to fetch SID %d\n", i); goto failed; @@ -104,6 +105,7 @@ static BOOL test_tdb_speed(struct torture_context *torture, const void *_data) key.dptr = (uint8_t *)talloc_asprintf(tmp_ctx, "UID %u", i); key.dsize = strlen((char *)key.dptr)+1; data = tdb_fetch(tdbw->tdb, key); + talloc_free(key.dptr); if (data.dptr == NULL) { torture_result(torture, TORTURE_FAIL, "Failed to fetch UID %d\n", i); goto failed; -- cgit