From 31e50ccae79e5ab4c292bf85fb1cec1b0babfa26 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 6 Oct 2006 06:52:30 +0000 Subject: r19114: fixed another checker warning and a possible error on allocation failure (This used to be commit bc02f7ef96e164a59441e3fd9429221be83fc7e4) --- source4/lib/ldb/ldb_tdb/ldb_index.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/lib/ldb/ldb_tdb') diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c index 59c1645ba8..8a9a82a98c 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_index.c +++ b/source4/lib/ldb/ldb_tdb/ldb_index.c @@ -232,13 +232,15 @@ static int ltdb_index_dn_simple(struct ldb_module *module, list->dn = talloc_array(list, char *, el->num_values); if (!list->dn) { - break; + talloc_free(msg); + return -1; } for (j=0;jnum_values;j++) { list->dn[list->count] = talloc_strdup(list->dn, (char *)el->values[j].data); if (!list->dn[list->count]) { + talloc_free(msg); return -1; } list->count++; -- cgit