summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2012-04-04 16:05:50 +0200
committerAndrew Bartlett <abartlet@samba.org>2012-04-11 12:50:16 +1000
commit55f4275f18088838ec2b8a37d59a49368e90deb8 (patch)
treee9092dcb0e4bf4b2216cab5514f0eac990c91e44 /lib
parent3d886e3e151c792685431385c9ea68e27a1d52b1 (diff)
downloadsamba-55f4275f18088838ec2b8a37d59a49368e90deb8.tar.gz
samba-55f4275f18088838ec2b8a37d59a49368e90deb8.tar.bz2
samba-55f4275f18088838ec2b8a37d59a49368e90deb8.zip
LDB:ldb_msg.c - add another OOM check in "ldb_msg_copy()"
Diffstat (limited to 'lib')
-rw-r--r--lib/ldb/common/ldb_msg.c1
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) {