diff options
Diffstat (limited to 'lib/ldb/common')
-rw-r--r-- | lib/ldb/common/ldb_msg.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ldb/common/ldb_msg.c b/lib/ldb/common/ldb_msg.c index 1a2bebc983..c17e5f37cf 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;j<el->num_values;j++) { el->values[j] = ldb_val_dup(el->values, &values[j]); if (el->values[j].data == NULL && values[j].length != 0) { |