|
|
dc8c34 |
From 9ed455ca83f5a5c706d5ebab09fa4700e7da6c52 Mon Sep 17 00:00:00 2001
|
|
|
dc8c34 |
From: Mark Reynolds <mreynolds@redhat.com>
|
|
|
dc8c34 |
Date: Thu, 6 Dec 2012 11:41:29 -0500
|
|
|
dc8c34 |
Subject: [PATCH 21/22] Ticket 526 - Coverity Issues for 1.2.11
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Reviewed by: richm(Thanks!)
|
|
|
dc8c34 |
(cherry picked from commit 39b0938b43a5dbfdc566b343e504585bad7de859)
|
|
|
dc8c34 |
---
|
|
|
dc8c34 |
ldap/servers/plugins/memberof/memberof.c | 7 +++++++
|
|
|
dc8c34 |
ldap/servers/slapd/back-ldbm/dblayer.c | 2 ++
|
|
|
dc8c34 |
lib/libaccess/acltools.cpp | 1 +
|
|
|
dc8c34 |
3 files changed, 10 insertions(+)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
diff --git a/ldap/servers/plugins/memberof/memberof.c b/ldap/servers/plugins/memberof/memberof.c
|
|
|
dc8c34 |
index 598f4d9..a3f875d 100644
|
|
|
dc8c34 |
--- a/ldap/servers/plugins/memberof/memberof.c
|
|
|
dc8c34 |
+++ b/ldap/servers/plugins/memberof/memberof.c
|
|
|
dc8c34 |
@@ -1105,6 +1105,13 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
|
|
|
dc8c34 |
const char *op_this = slapi_sdn_get_ndn(op_this_sdn);
|
|
|
dc8c34 |
Slapi_Value *to_dn_val = slapi_value_new_string(op_to);
|
|
|
dc8c34 |
Slapi_Value *this_dn_val = slapi_value_new_string(op_this);
|
|
|
dc8c34 |
+
|
|
|
dc8c34 |
+ if(this_dn_val == NULL || to_dn_val == NULL){
|
|
|
dc8c34 |
+ slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
|
|
|
dc8c34 |
+ "memberof_modop_one_replace_r: failed to get DN values (NULL)\n");
|
|
|
dc8c34 |
+ goto bail;
|
|
|
dc8c34 |
+ }
|
|
|
dc8c34 |
+
|
|
|
dc8c34 |
/* op_this and op_to are both case-normalized */
|
|
|
dc8c34 |
slapi_value_set_flags(this_dn_val, SLAPI_ATTR_FLAG_NORMALIZED_CIS);
|
|
|
dc8c34 |
slapi_value_set_flags(to_dn_val, SLAPI_ATTR_FLAG_NORMALIZED_CIS);
|
|
|
dc8c34 |
diff --git a/ldap/servers/slapd/back-ldbm/dblayer.c b/ldap/servers/slapd/back-ldbm/dblayer.c
|
|
|
dc8c34 |
index 5452d6b..2fd2110 100644
|
|
|
dc8c34 |
--- a/ldap/servers/slapd/back-ldbm/dblayer.c
|
|
|
dc8c34 |
+++ b/ldap/servers/slapd/back-ldbm/dblayer.c
|
|
|
dc8c34 |
@@ -1910,6 +1910,8 @@ dblayer_get_id2entry_size(ldbm_instance *inst)
|
|
|
dc8c34 |
ID2ENTRY LDBM_FILENAME_SUFFIX);
|
|
|
dc8c34 |
rc = PR_GetFileInfo(id2entry_file, &info;;
|
|
|
dc8c34 |
slapi_ch_free_string(&id2entry_file);
|
|
|
dc8c34 |
+ if (inst_dirp != inst_dir)
|
|
|
dc8c34 |
+ slapi_ch_free_string(&inst_dirp);
|
|
|
dc8c34 |
if (rc) {
|
|
|
dc8c34 |
return 0;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
diff --git a/lib/libaccess/acltools.cpp b/lib/libaccess/acltools.cpp
|
|
|
dc8c34 |
index 69d0c2e..df08658 100644
|
|
|
dc8c34 |
--- a/lib/libaccess/acltools.cpp
|
|
|
dc8c34 |
+++ b/lib/libaccess/acltools.cpp
|
|
|
dc8c34 |
@@ -1415,6 +1415,7 @@ char *errmsg;
|
|
|
dc8c34 |
eid = ACLERR1500;
|
|
|
dc8c34 |
errmsg = system_errmsg();
|
|
|
dc8c34 |
nserrGenerate(errp, rv, eid, ACL_Program, 2, "buffer", errmsg);
|
|
|
dc8c34 |
+ PERM_FREE(errmsg);
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
--
|
|
|
dc8c34 |
1.7.11.7
|
|
|
dc8c34 |
|