[SCM] Samba Shared Repository - branch v3-6-test updated
Volker Lendecke
vlendec at samba.org
Mon Mar 21 09:35:41 MDT 2011
The branch, v3-6-test has been updated
via 0e74bc9 s3: Fix Coverity ID 1048, CHECKED_RETURN
via 4a486a7 s3: Fix Coverity ID 770, REVERSE_INULL
from 665df24 selftest/Samba3: use 'debug pid=yes'
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit 0e74bc96fe11a49a7e08982259926037d6c30a03
Author: Volker Lendecke <vl at samba.org>
Date: Mon Mar 21 10:56:10 2011 +0100
s3: Fix Coverity ID 1048, CHECKED_RETURN
This is a real bug: tevent_req_set_endtime already calls tevent_req_nomem.
Autobuild-User: Volker Lendecke <vlendec at samba.org>
Autobuild-Date: Mon Mar 21 16:29:22 CET 2011 on sn-devel-104
(cherry picked from commit 16155812e04cee6542746b8dbb4a9a7acb93de70)
commit 4a486a7785bf1076dd5244a3a3c841aced322780
Author: Volker Lendecke <vl at samba.org>
Date: Mon Mar 21 10:46:53 2011 +0100
s3: Fix Coverity ID 770, REVERSE_INULL
We dereference "res" in various places, no point in checking. All current
callers send "res!=NULL".
(cherry picked from commit 8dc93bed09961ada9a25e8144cb761d1d7bd1ac5)
-----------------------------------------------------------------------
Summary of changes:
source3/libads/ldap_printer.c | 22 +++++++---------------
source3/winbindd/winbindd_dual.c | 7 +------
2 files changed, 8 insertions(+), 21 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c
index e4bfbce..251dfb0 100644
--- a/source3/libads/ldap_printer.c
+++ b/source3/libads/ldap_printer.c
@@ -47,33 +47,25 @@
return status;
}
if (ads_count_replies(ads, *res) != 1) {
- if (res) {
- ads_msgfree(ads, *res);
- *res = NULL;
- }
+ ads_msgfree(ads, *res);
+ *res = NULL;
return ADS_ERROR(LDAP_NO_SUCH_OBJECT);
}
srv_dn = ldap_get_dn(ads->ldap.ld, *res);
if (srv_dn == NULL) {
- if (res) {
- ads_msgfree(ads, *res);
- *res = NULL;
- }
+ ads_msgfree(ads, *res);
+ *res = NULL;
return ADS_ERROR(LDAP_NO_MEMORY);
}
srv_cn = ldap_explode_dn(srv_dn, 1);
if (srv_cn == NULL) {
ldap_memfree(srv_dn);
- if (res) {
- ads_msgfree(ads, *res);
- *res = NULL;
- }
- return ADS_ERROR(LDAP_INVALID_DN_SYNTAX);
- }
- if (res) {
ads_msgfree(ads, *res);
*res = NULL;
+ return ADS_ERROR(LDAP_INVALID_DN_SYNTAX);
}
+ ads_msgfree(ads, *res);
+ *res = NULL;
if (asprintf(&s, "(cn=%s-%s)", srv_cn[0], printer) == -1) {
ldap_memfree(srv_dn);
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index 4776873..2490073 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -150,12 +150,7 @@ static void wb_child_request_trigger(struct tevent_req *req,
return;
}
tevent_req_set_callback(subreq, wb_child_request_done, req);
-
- if (!tevent_req_set_endtime(req, state->ev,
- timeval_current_ofs(300, 0))) {
- tevent_req_nomem(NULL, req);
- return;
- }
+ tevent_req_set_endtime(req, state->ev, timeval_current_ofs(300, 0));
}
static void wb_child_request_done(struct tevent_req *subreq)
--
Samba Shared Repository
More information about the samba-cvs
mailing list