Content-Length: 266023 | pFad | http://github.com/postgrespro/postgres/commit/11ad3b35c25de6edcaa8a7695cb1d58650c546d3

51 Remove unnecessary cleanup code. · postgrespro/postgres@11ad3b3 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/11ad3b35c25de6edcaa8a7695cb1d58650c546d3

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy