samba-cvs.cvs
[Top] [All Lists]

svn commit: samba r19486 - in branches/SAMBA_3_0/source/lib/ldb/common:

Subject: svn commit: samba r19486 - in branches/SAMBA_3_0/source/lib/ldb/common: .
From:
Date: Tue, 24 Oct 2006 20:20:40 +0000 GMT
Author: vlendec
Date: 2006-10-24 20:20:39 +0000 (Tue, 24 Oct 2006)
New Revision: 19486

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19486

Log:
Probably Coverity is wrong here, but this fixes their ID 317. Not sure whether
to merge it to 4_0. I want it in 3_0 because it took a bit to persuade myself
that el can not be NULL here.

Volker

Modified:
   branches/SAMBA_3_0/source/lib/ldb/common/ldb_msg.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/ldb/common/ldb_msg.c
===================================================================
--- branches/SAMBA_3_0/source/lib/ldb/common/ldb_msg.c  2006-10-24 20:15:13 UTC 
(rev 19485)
+++ branches/SAMBA_3_0/source/lib/ldb/common/ldb_msg.c  2006-10-24 20:20:39 UTC 
(rev 19486)
@@ -209,7 +209,9 @@
        ret = ldb_msg_add_value(msg, attr_name, val);
        if (ret == LDB_SUCCESS) {
                struct ldb_message_element *el;
-               el = ldb_msg_find_element(msg, attr_name);
+               if (!(el = ldb_msg_find_element(msg, attr_name))) {
+                       return LDB_ERR_OPERATIONS_ERROR;
+               }
                talloc_steal(el->values, val->data);
        }
        return ret;

<Prev in Thread] Current Thread [Next in Thread>
  • svn commit: samba r19486 - in branches/SAMBA_3_0/source/lib/ldb/common: ., vlendec <=