[Python-checkins] python/dist/src/Modules mmapmodule.c,2.41,2.42
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Fri, 10 Jan 2003 12:52:18 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv20383/Modules
Modified Files:
mmapmodule.c
Log Message:
SF #665913, Fix mmap module core dump with unix
Closing an mmap'ed file (calling munmap) twice on Solaris caused a core dump.
Will backport.
Index: mmapmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v
retrieving revision 2.41
retrieving revision 2.42
diff -C2 -d -r2.41 -r2.42
*** mmapmodule.c 5 Sep 2002 21:48:05 -0000 2.41
--- mmapmodule.c 10 Jan 2003 20:52:15 -0000 2.42
***************
*** 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