You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/pypam/files/PyPAM-0.5.0-dealloc.patch

18 lines
607 B

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)