git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d886e3
)
LDB:ldb_msg.c - add another OOM check in "ldb_msg_copy()"
author
Matthias Dieter Wallnöfer
<mdw@samba.org>
Wed, 4 Apr 2012 14:05:50 +0000
(16:05 +0200)
committer
Andrew Bartlett
<abartlet@samba.org>
Wed, 11 Apr 2012 02:50:16 +0000
(12:50 +1000)
lib/ldb/common/ldb_msg.c
patch
|
blob
|
history
diff --git
a/lib/ldb/common/ldb_msg.c
b/lib/ldb/common/ldb_msg.c
index 1a2bebc983fad4e56fce73ead5d42b6924a676a4..c17e5f37cfa3d1a53e977ef81cfa68d9129b9280 100644
(file)
--- 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) {