From 55f4275f18088838ec2b8a37d59a49368e90deb8 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Wed, 4 Apr 2012 16:05:50 +0200 Subject: LDB:ldb_msg.c - add another OOM check in "ldb_msg_copy()" --- lib/ldb/common/ldb_msg.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/ldb/common/ldb_msg.c b/lib/ldb/common/ldb_msg.c index 1a2bebc983f..c17e5f37cfa 100644 --- a/lib/ldb/common/ldb_msg.c +++ b/lib/ldb/common/ldb_msg.c @@ -652,6 +652,7 @@ struct ldb_message *ldb_msg_copy(TALLOC_CTX *mem_ctx, el->name = talloc_strdup(msg2->elements, el->name); if (el->name == NULL) goto failed; el->values = talloc_array(msg2->elements, struct ldb_val, el->num_values); + if (el->values == NULL) goto failed; for (j=0;jnum_values;j++) { el->values[j] = ldb_val_dup(el->values, &values[j]); if (el->values[j].data == NULL && values[j].length != 0) { -- cgit