diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-10-06 06:52:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:20:36 -0500 |
commit | 31e50ccae79e5ab4c292bf85fb1cec1b0babfa26 (patch) | |
tree | b0f53c4cbd2d092f1ca4dfbe0db9ab63d4d453df | |
parent | f1f807e66bba73dcb2eb4b1f923167815908a77d (diff) | |
download | samba-31e50ccae79e5ab4c292bf85fb1cec1b0babfa26.tar.gz samba-31e50ccae79e5ab4c292bf85fb1cec1b0babfa26.tar.bz2 samba-31e50ccae79e5ab4c292bf85fb1cec1b0babfa26.zip |
r19114: fixed another checker warning and a possible error on allocation
failure
(This used to be commit bc02f7ef96e164a59441e3fd9429221be83fc7e4)
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_index.c | 4 |
1 files changed, 3 insertions, 1 deletions
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;j<el->num_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++; |