git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c26c2a
)
r19370: Handle errors if talloc_reference fails
author
Simo Sorce
<idra@samba.org>
Tue, 17 Oct 2006 12:35:33 +0000
(12:35 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 19:21:18 +0000
(14:21 -0500)
source/lib/ldb/modules/ldb_map_outbound.c
patch
|
blob
|
history
diff --git
a/source/lib/ldb/modules/ldb_map_outbound.c
b/source/lib/ldb/modules/ldb_map_outbound.c
index 02876eea552b1a97b86712e130e62ae5b9225e18..cd33f2904363714277c32666f2f567a61c6f8b8e 100644
(file)
--- a/
source/lib/ldb/modules/ldb_map_outbound.c
+++ b/
source/lib/ldb/modules/ldb_map_outbound.c
@@
-204,9
+204,14
@@
static int ldb_msg_replace(struct ldb_message *msg, const struct ldb_message_ele
/* copy new element */
*old = *el;
+
/* and make sure we reference the contents */
- talloc_reference(msg->elements, el->name);
- talloc_reference(msg->elements, el->values);
+ if (!talloc_reference(msg->elements, el->name)) {
+ return -1;
+ }
+ if (!talloc_reference(msg->elements, el->values)) {
+ return -1;
+ }
return 0;
}