diff options
author | Simo Sorce <idra@samba.org> | 2006-10-17 12:35:33 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:21:18 -0500 |
commit | 8c015370d2056a2803efe522b2b6dcabfa0aafd8 (patch) | |
tree | 2e0a4214f9593340547579519d2f83d3bff1716b /source4/lib/ldb/modules | |
parent | 87e8218d09088fbc13901ead300f7a5d1712f9a3 (diff) | |
download | samba-8c015370d2056a2803efe522b2b6dcabfa0aafd8.tar.gz samba-8c015370d2056a2803efe522b2b6dcabfa0aafd8.tar.bz2 samba-8c015370d2056a2803efe522b2b6dcabfa0aafd8.zip |
r19370: Handle errors if talloc_reference fails
(This used to be commit 05134a90e3ff0e4039dbd34c52f824bc666feb11)
Diffstat (limited to 'source4/lib/ldb/modules')
-rw-r--r-- | source4/lib/ldb/modules/ldb_map_outbound.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/lib/ldb/modules/ldb_map_outbound.c b/source4/lib/ldb/modules/ldb_map_outbound.c index 02876eea55..cd33f29043 100644 --- a/source4/lib/ldb/modules/ldb_map_outbound.c +++ b/source4/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; } |