Do not leak memory memory leak in plugin_common.c for password callback (#1191183)

This commit is contained in:
Jakub Jelen 2015-03-12 13:13:13 +01:00
parent 48b97a8104
commit c11ac22f93
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,12 @@
diff --git a/plugins/plugin_common.c b/plugins/plugin_common.c
index fc66062..3ef81e9 100644
--- a/plugins/plugin_common.c
+++ b/plugins/plugin_common.c
@@ -416,6 +416,7 @@ int _plug_get_password(const sasl_utils_t *utils, sasl_secret_t **password,
PARAMERROR(utils);
return SASL_BADPARAM;
}
+ *iscopy = 1;
}
return ret;

View File

@ -56,6 +56,8 @@ Patch52: cyrus-sasl-2.1.26-config-error.patch
Patch53: cyrus-sasl-2.1.26-prefer-SCRAM-SHA-1-over-PLAIN.patch Patch53: cyrus-sasl-2.1.26-prefer-SCRAM-SHA-1-over-PLAIN.patch
# Do not leak memory in sample server (#852755) # Do not leak memory in sample server (#852755)
Patch54: cyrus-sasl-2.1.26-sample-leak.patch Patch54: cyrus-sasl-2.1.26-sample-leak.patch
# Do not leak memory memory leak in plugin_common.c for password callback (#1191183)
Patch55: cyrus-sasl-2.1.26-leak-callback-plugin_common.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, automake, libtool, gdbm-devel, groff BuildRequires: autoconf, automake, libtool, gdbm-devel, groff
@ -201,6 +203,7 @@ chmod -x include/*.h
%patch52 -p1 -b .configerr %patch52 -p1 -b .configerr
%patch53 -p1 -b .sha1vsplain %patch53 -p1 -b .sha1vsplain
%patch54 -p1 -b .leak %patch54 -p1 -b .leak
%patch55 -p1 -b .password-callback
%build %build