svn commit: samba r19490 - in
branches/SAMBA_4_0/source/lib/ldb/common: .
idra at samba.org
idra at samba.org
Wed Oct 25 01:59:07 GMT 2006
Author: idra
Date: 2006-10-25 01:59:07 +0000 (Wed, 25 Oct 2006)
New Revision: 19490
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19490
Log:
better to check the return result
Modified:
branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c 2006-10-25 01:42:59 UTC (rev 19489)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c 2006-10-25 01:59:07 UTC (rev 19490)
@@ -183,14 +183,15 @@
{
struct ldb_message_element *el;
struct ldb_val *vals;
+ int ret;
el = ldb_msg_find_element(msg, attr_name);
if (!el) {
- ldb_msg_add_empty(msg, attr_name, 0, &el);
+ ret = ldb_msg_add_empty(msg, attr_name, 0, &el);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
}
- if (!el) {
- return LDB_ERR_OPERATIONS_ERROR;
- }
vals = talloc_realloc(msg, el->values, struct ldb_val, el->num_values+1);
if (!vals) {
More information about the samba-cvs
mailing list