From: Ulrich Drepper Date: Sun, 5 Sep 1999 23:30:54 +0000 (+0000) Subject: (__db_rdetach): Unmap the region if necessary. X-Git-Tag: cvs/glibc_2-1-2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79effba1aa3c324a2d800d4e8d3badb0a09808c1;p=thirdparty%2Fglibc.git (__db_rdetach): Unmap the region if necessary. --- diff --git a/db2/common/db_region.c b/db2/common/db_region.c index 284af6176a7..4542fcf5d2e 100644 --- a/db2/common/db_region.c +++ b/db2/common/db_region.c @@ -507,8 +507,18 @@ __db_rdetach(infop) * If the region was removed when it was created, no further action * is required. */ - if (F_ISSET(infop, REGION_REMOVED)) + if (F_ISSET(infop, REGION_REMOVED)) { + if (F_ISSET(infop, REGION_PRIVATE) + && !F_ISSET(infop, REGION_MALLOC)) + /* + * If it is private and not malloced, the + * region is still mapped in. We need to + * discard our mapping of the region. + */ + ret = __db_unmapregion(infop); goto done; + } + /* * If the region was created in memory returned by malloc, the only * action required is freeing the memory.