From: Robert Haas Date: Thu, 22 May 2014 14:40:00 +0000 (-0400) Subject: Remove unnecessary cleanup code. X-Git-Tag: REL9_4_BETA2~148 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11ad3b35c25de6edcaa8a7695cb1d58650c546d3;p=postgresql 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. --- diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c index 74dace999e..0819641ad9 100644 --- a/src/backend/storage/ipc/dsm_impl.c +++ b/src/backend/storage/ipc/dsm_impl.c @@ -554,14 +554,6 @@ dsm_impl_sysv(dsm_op op, dsm_handle handle, Size request_size, 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, (errcode_for_dynamic_shared_memory(), errmsg("could not stat shared memory segment \"%s\": %m",