]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Correct statement to actually be the intended assert statement.
authorAndres Freund <andres@anarazel.de>
Mon, 14 Dec 2015 10:25:02 +0000 (11:25 +0100)
committerAndres Freund <andres@anarazel.de>
Mon, 14 Dec 2015 10:25:02 +0000 (11:25 +0100)
e3f4cfc7 introduced a LWLockHeldByMe() call, without the corresponding
Assert() surrounding it.

Spotted by Coverity.

Backpatch: 9.1+, like the previous commit

src/backend/storage/buffer/bufmgr.c

index 3b2c40ce42c936697f609bb1c6d7aac611a28340..3ae203fde013f25e7273fbe2d50461220e0acd00 100644 (file)
@@ -2564,7 +2564,7 @@ FlushOneBuffer(Buffer buffer)
 
        bufHdr = &BufferDescriptors[buffer - 1];
 
-       LWLockHeldByMe(bufHdr->content_lock);
+       Assert(LWLockHeldByMe(bufHdr->content_lock));
 
        FlushBuffer(bufHdr, NULL);
 }