[Python-checkins] python/dist/src/Modules mmapmodule.c,2.35.6.3,2.35.6.4
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Fri, 10 Jan 2003 13:03:14 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv25944/Modules
Modified Files:
Tag: release22-maint
mmapmodule.c
Log Message:
backport:
SF #665913, Fix mmap module core dump with unix
Closing an mmap'ed file (calling munmap) twice on Solaris caused a core dump.
Index: mmapmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v
retrieving revision 2.35.6.3
retrieving revision 2.35.6.4
diff -C2 -d -r2.35.6.3 -r2.35.6.4
*** mmapmodule.c 5 Sep 2002 22:30:03 -0000 2.35.6.3
--- mmapmodule.c 10 Jan 2003 21:02:40 -0000 2.35.6.4
***************
*** 142,147 ****
#ifdef UNIX
! munmap(self->data, self->size);
! self->data = NULL;
#endif
--- 142,149 ----
#ifdef UNIX
! if (self->data != NULL) {
! munmap(self->data, self->size);
! self->data = NULL;
! }
#endif