Skip to content

Commit 231bcd0

Browse files
committed
Fix incorrect close() call in dsm_impl_mmap().
One improbable error-exit path in this function used close() where it should have used CloseTransientFile(). This is unlikely to be hit in the field, and I think the consequences wouldn't be awful (just an elog(LOG) bleat later). But a bug is a bug, so back-patch to 9.4 where this code came in. Pan Bian Discussion: https://postgr.es/m/152056616579.4966.583293218357089052@wrigleys.postgresql.org
1 parent 074251d commit 231bcd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/storage/ipc/dsm_impl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size,
924924

925925
/* Back out what's already been done. */
926926
save_errno = errno;
927-
close(fd);
927+
CloseTransientFile(fd);
928928
if (op == DSM_OP_CREATE)
929929
unlink(name);
930930
errno = save_errno;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy