[PyPAM/el5/master] add PyPAM-0.5.0-dealloc.patch

Miroslav Suchý msuchy at fedoraproject.org
Tue Feb 22 08:30:50 UTC 2011


commit 06087550b59f8c21151ad578afcf607daf8789cb
Author: Miroslav Suchý <msuchy at redhat.com>
Date:   Tue Feb 22 09:29:45 2011 +0100

    add PyPAM-0.5.0-dealloc.patch

 PyPAM-0.5.0-dealloc.patch |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/PyPAM-0.5.0-dealloc.patch b/PyPAM-0.5.0-dealloc.patch
new file mode 100644
index 0000000..b73dd0b
--- /dev/null
+++ b/PyPAM-0.5.0-dealloc.patch
@@ -0,0 +1,17 @@
+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)


More information about the scm-commits mailing list