From 442f5526a043be624e35c8ab2de60de2630cd619 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 9 Oct 2006 08:32:51 +0000 Subject: r19193: merge from samba4: fixed another checker warning and a possible error on allocation failure metze (This used to be commit d64583a763ffcff27f0bd6761196f7d554d44849) --- source3/lib/ldb/ldb_tdb/ldb_index.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/lib/ldb') diff --git a/source3/lib/ldb/ldb_tdb/ldb_index.c b/source3/lib/ldb/ldb_tdb/ldb_index.c index 59c1645ba8..8a9a82a98c 100644 --- a/source3/lib/ldb/ldb_tdb/ldb_index.c +++ b/source3/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