summaryrefslogtreecommitdiffstats
path: root/package/python-pam/0001-dealloc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/python-pam/0001-dealloc.patch')
-rw-r--r--package/python-pam/0001-dealloc.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/python-pam/0001-dealloc.patch b/package/python-pam/0001-dealloc.patch
new file mode 100644
index 0000000000..dd4f9610c7
--- /dev/null
+++ b/package/python-pam/0001-dealloc.patch
@@ -0,0 +1,25 @@
+[PATCH] fix two bugs in the PAM object deallocation
+
+Fixes https://bugzilla.redhat.com/show_bug.cgi?id=658955
+
+Downloaded from:
+http://pkgs.fedoraproject.org/cgit/PyPAM.git/plain/PyPAM-0.5.0-dealloc.patch
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+diff -up PyPAM-0.5.0/PAMmodule.c.dealloc PyPAM-0.5.0/PAMmodule.c
+--- PyPAM-0.5.0/PAMmodule.c.dealloc 2011-01-17 22:48:22.000000000 +0100
++++ PyPAM-0.5.0/PAMmodule.c 2011-01-18 21:24:59.000000000 +0100
+@@ -538,10 +538,11 @@ static void PyPAM_dealloc(PyPAMObject *s
+ free(self->service);
+ free(self->user);
+ free(self->conv);
+- pam_end(self->pamh, PAM_SUCCESS);
++ if (self->pamh)
++ pam_end(self->pamh, PAM_SUCCESS);
+ dlclose(self->dlh2);
+ dlclose(self->dlh1);
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+ static PyObject * PyPAM_getattr(PyPAMObject *self, char *name)
OpenPOWER on IntegriCloud