ldap/servers/plugins/replication/repl5_tot_protocol.c | 4 ++--
ldap/servers/slapd/util.c | 10 +++++++---
3 files changed, 10 insertions(+), 6 deletions(-)
New commits:
commit 622d6a603af76c65718ab08e2ea54984b2809fb2
Author: Noriko Hosoi <nhosoi@redhat.com>
Date: Wed Jun 29 18:49:55 2016 -0700
bump version to 1.3.5.10
diff --git a/VERSION.sh b/VERSION.sh
index 3c94c1f..818869c 100644
--- a/VERSION.sh
+++ b/VERSION.sh
@@ -10,7 +10,7 @@ vendor="389 Project"
# PACKAGE_VERSION is constructed from these
VERSION_MAJOR=1
VERSION_MINOR=3
-VERSION_MAINT=5.9
+VERSION_MAINT=5.10
# NOTE: VERSION_PREREL is automatically set for builds made out of a git tree
VERSION_PREREL=
VERSION_DATE=`date -u +%Y%m%d%H%M%S`
commit 0ef4adbc6bc671d5f9fa0c91a3cd785cb979450a
Author: Noriko Hosoi <nhosoi@redhat.com>
Date: Wed Jun 29 18:28:26 2016 -0700
Ticket #48905 - coverity defects
(1) Clang warning.
ldap/servers/slapd/util.c:1631:20: warning: Dereference of null
pointer (loaded from variable 'procpages')
Fix Description - Changed to check if procpages as well as other
arguments to return values are NULL or not first. If any of them
is NULL, the function returns failure.
(2) Resource Leaks.
ldap/servers/plugins/replication/repl5_tot_protocol.c:616:
leaked_storage: Variable "pb" going out of scope leaks the storage
it points to.
Fix Description - Moved "lapi_pblock_destroy(pb)" to the location
next to the "done" label so that it is guaranteed that "pb" is
destroyed when the function returns.
diff --git a/ldap/servers/plugins/replication/repl5_tot_protocol.c b/ldap/servers/plugins/replication/repl5_tot_protocol.c
index aac89bd..bd43a96 100644
--- a/ldap/servers/plugins/replication/repl5_tot_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_tot_protocol.c
@@ -314,7 +314,7 @@ repl5_tot_run(Private_Repl_Protocol *prp)
{
int rc;
callback_data cb_data = {0};
- Slapi_PBlock *pb;
+ Slapi_PBlock *pb = NULL;
LDAPControl **ctrls;
char *hostname = NULL;
int portnum = 0;
@@ -575,7 +575,6 @@ retry:
* suitable messages will have been logged to the error log about the failure.
*/
- slapi_pblock_destroy (pb);
agmt_set_last_init_end(prp->agmt, current_time());
rc = cb_data.rc;
agmt_set_update_in_progress(prp->agmt, PR_FALSE);
@@ -595,6 +594,7 @@ retry:
}
done:
+ slapi_pblock_destroy(pb);
slapi_sdn_free(&area_sdn);
slapi_ch_free_string(&hostname);
if (cb_data.flowcontrol_detection > 1)
diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c
index e96b32b..a5327d1 100644
--- a/ldap/servers/slapd/util.c
+++ b/ldap/servers/slapd/util.c
@@ -1500,18 +1500,22 @@ static size_t util_getvirtualmemsize()
*/
int util_info_sys_pages(size_t *pagesize, size_t *pages, size_t *procpages, size_t *availpages)
{
+ if ((NULL == pagesize) || (NULL == pages) || (NULL == procpages) || (NULL == availpages)) {
+ slapi_log_error(SLAPI_LOG_FATAL, "util_info_sys_pages",
+ "ERROR: Null return variables are passed. Skip getting the system info.\n");
+ return 1;
+ }
*pagesize = 0;
*pages = 0;
*availpages = 0;
- if (procpages)
- *procpages = 0;
+ *procpages = 0;
#ifdef OS_solaris
*pagesize = (int)sysconf(_SC_PAGESIZE);
*pages = (int)sysconf(_SC_PHYS_PAGES);
*availpages = util_getvirtualmemsize() / *pagesize;
/* solaris has THE most annoying way to get this info */
- if (procpages) {
+ {
struct prpsinfo psi;
char fn[40];
int fd;
--
389-commits mailing list
389-commits@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/389-commits@lists.fedoraproject.org
No comments:
Post a Comment