mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
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
This commit is contained in:
parent
074251db67
commit
231bcd0803
@ -924,7 +924,7 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size,
|
|||||||
|
|
||||||
/* Back out what's already been done. */
|
/* Back out what's already been done. */
|
||||||
save_errno = errno;
|
save_errno = errno;
|
||||||
close(fd);
|
CloseTransientFile(fd);
|
||||||
if (op == DSM_OP_CREATE)
|
if (op == DSM_OP_CREATE)
|
||||||
unlink(name);
|
unlink(name);
|
||||||
errno = save_errno;
|
errno = save_errno;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user