This is an automated email from the git hooks/post-receive script.
mreynolds pushed a change to branch 389-ds-base-1.3.5
in repository 389-ds-base.
from d0d8e6e Issue 49170 - sync plugin thread count not handled correctly
new 798b7e0 Fix double-free in _cl5NewDBFile() error path
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
ldap/servers/plugins/replication/cl5_api.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.5
in repository 389-ds-base.
commit 798b7e02b7a7cc67c229d107b71cf91b4073f75e
Author: Adam Tkac <vonsch(a)gmail.com>
Date: Sat Mar 18 23:34:54 2017 +0100
Fix double-free in _cl5NewDBFile() error path
Although slapi_ch_free should prevent double-free errors, it doesn't work
in old code because after assignment
(*dbFile)->name = name;
two independent pointers points to the same allocated area and both pointers
are free()-ed (one directly in error path in _cl5NewDBFile and the second
in _cl5DBCloseFile, called in error path as well).
Signed-off-by: Mark Reynolds <mreynolds(a)redhat.com>
(cherry picked from commit 13e89e5fe96d0e9fe67764307f9a1d340ef593f7)
---
ldap/servers/plugins/replication/cl5_api.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ldap/servers/plugins/replication/cl5_api.c
b/ldap/servers/plugins/replication/cl5_api.c
index e72633a..194250e 100644
--- a/ldap/servers/plugins/replication/cl5_api.c
+++ b/ldap/servers/plugins/replication/cl5_api.c
@@ -6226,9 +6226,10 @@ out:
}
(*dbFile)->db = db;
- (*dbFile)->name = name;
- (*dbFile)->replName = slapi_ch_strdup (replName);
- (*dbFile)->replGen = slapi_ch_strdup (replGen);
+ (*dbFile)->name = name;
+ name = NULL; /* transfer ownership to dbFile struct */
+ (*dbFile)->replName = slapi_ch_strdup (replName);
+ (*dbFile)->replGen = slapi_ch_strdup (replGen);
/*
* Considerations for setting up cl semaphore:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.