diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-04-11 11:13:31 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-04-11 11:31:47 +0200 |
commit | cc32e7aff2e071e0b1985097bb8526ce36160391 (patch) | |
tree | 2c46519ec338cbf7520b87385180e68a88e8acde /source4/torture/local | |
parent | b91484a1a075c2913ebb50ee034f36580387bfa8 (diff) | |
download | samba-cc32e7aff2e071e0b1985097bb8526ce36160391.tar.gz samba-cc32e7aff2e071e0b1985097bb8526ce36160391.tar.bz2 samba-cc32e7aff2e071e0b1985097bb8526ce36160391.zip |
s4:torture - "dbspeed" test
Add more "talloc_free"s where needed or useful.
Diffstat (limited to 'source4/torture/local')
-rw-r--r-- | source4/torture/local/dbspeed.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/torture/local/dbspeed.c b/source4/torture/local/dbspeed.c index 236a52b517..4033979331 100644 --- a/source4/torture/local/dbspeed.c +++ b/source4/torture/local/dbspeed.c @@ -142,10 +142,12 @@ static bool ldb_add_record(struct ldb_context *ldb, unsigned rid) msg->dn = ldb_dn_new_fmt(msg, ldb, "SID=S-1-5-21-53173311-3623041448-2049097239-%u", rid); if (msg->dn == NULL) { + talloc_free(msg); return false; } if (ldb_msg_add_fmt(msg, "UID", "%u", rid) != 0) { + talloc_free(msg); return false; } @@ -236,14 +238,13 @@ static bool test_ldb_speed(struct torture_context *torture, const void *_data) torture_comment(torture, "ldb/tdb speed ratio is %.2f%%\n", (100*ldb_speed/tdb_speed)); - - unlink("./test.ldb"); talloc_free(tmp_ctx); + unlink("./test.ldb"); return true; failed: - unlink("./test.ldb"); talloc_free(tmp_ctx); + unlink("./test.ldb"); return false; } |