Files
gentoo/dev-python/pypam/files/PyPAM-0.5.0-dealloc.patch
T
Andreas Sturmlechner 7fc5f8e835 dev-python/pypam: EAPI-7 bump
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2021-04-05 10:56:51 +02:00

18 lines
479 B
Diff

diff -up a/PAMmodule.c b/PAMmodule.c
--- a/PAMmodule.c
+++ b/PAMmodule.c
@@ -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)