mirror of
https://github.com/postgres/postgres.git
synced 2025-04-29 13:56:47 +03:00
Remove unnecessary cleanup code.
This is all inside a block guarded by op == DSM_OP_ATTACH, so it can never be the case that op == DSM_OP_CREATE. Reported by Coverity.
This commit is contained in:
parent
06db9cce22
commit
11ad3b35c2
@ -554,14 +554,6 @@ dsm_impl_sysv(dsm_op op, dsm_handle handle, Size request_size,
|
|||||||
|
|
||||||
if (shmctl(ident, IPC_STAT, &shm) != 0)
|
if (shmctl(ident, IPC_STAT, &shm) != 0)
|
||||||
{
|
{
|
||||||
int save_errno;
|
|
||||||
|
|
||||||
/* Back out what's already been done. */
|
|
||||||
save_errno = errno;
|
|
||||||
if (op == DSM_OP_CREATE)
|
|
||||||
shmctl(ident, IPC_RMID, NULL);
|
|
||||||
errno = save_errno;
|
|
||||||
|
|
||||||
ereport(elevel,
|
ereport(elevel,
|
||||||
(errcode_for_dynamic_shared_memory(),
|
(errcode_for_dynamic_shared_memory(),
|
||||||
errmsg("could not stat shared memory segment \"%s\": %m",
|
errmsg("could not stat shared memory segment \"%s\": %m",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user