From ef70f5dd35974115a85850d04b0f4b64e511659f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 08:13:26 +0930 Subject: tdb2: log allocation failures in tdb1 backend. The TDB2 tests are stricter about this; they want every error logged. Signed-off-by: Rusty Russell (Imported from CCAN commit 670ba98f74b52df541d153eeab9d3310932e75cd) --- lib/tdb2/tdb1_tdb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/tdb2/tdb1_tdb.c') diff --git a/lib/tdb2/tdb1_tdb.c b/lib/tdb2/tdb1_tdb.c index 9730dceffc..45db2ba33b 100644 --- a/lib/tdb2/tdb1_tdb.c +++ b/lib/tdb2/tdb1_tdb.c @@ -498,7 +498,9 @@ static int _tdb1_store(struct tdb_context *tdb, TDB_DATA key, fails and we are left with a dead spot in the tdb. */ if (!(p = (char *)malloc(key.dsize + dbuf.dsize))) { - tdb->last_error = TDB_ERR_OOM; + tdb->last_error = tdb_logerr(tdb, TDB_ERR_OOM, TDB_LOG_ERROR, + "tdb1_store: out of memory" + " allocating copy"); goto fail; } -- cgit