Skip to content

Commit 11ad3b3

Browse files
committed
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.
1 parent 06db9cc commit 11ad3b3

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/backend/storage/ipc/dsm_impl.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -554,14 +554,6 @@ dsm_impl_sysv(dsm_op op, dsm_handle handle, Size request_size,
554554

555555
if (shmctl(ident, IPC_STAT, &shm) != 0)
556556
{
557-
int save_errno;
558-
559-
/* Back out what's already been done. */
560-
save_errno = errno;
561-
if (op == DSM_OP_CREATE)
562-
shmctl(ident, IPC_RMID, NULL);
563-
errno = save_errno;
564-
565557
ereport(elevel,
566558
(errcode_for_dynamic_shared_memory(),
567559
errmsg("could not stat shared memory segment \"%s\": %m",

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