Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitda87dc0

Browse files
committed
Add missing pointer dereference in pg_backend_memory_contexts view
32d3ed8 moved the logic for setting the context's name and ident intoa reusable function. I missed adding a pointer dereference aftercopying and pasting the code into that function. The ident parameter isa pointer to the ident variable in the calling function, so thedereference is required to correctly determine if the contents of thatvariable is NULL or not.In passing, adjust the if condition to include an == NULL to make itmore clear that it's not checking for == '\0'.Reported-by: Tom Lane, CoverityDiscussion:https://postgr.es/m/2256588.1722184287@sss.pgh.pa.us
1 parentc0ef123 commitda87dc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/utils/adt/mcxtfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ get_memory_context_name_and_ident(MemoryContext context, const char **const name
5555
* To be consistent with logging output, we label dynahash contexts with
5656
* just the hash table name as with MemoryContextStatsPrint().
5757
*/
58-
if (ident&&strcmp(*name,"dynahash")==0)
58+
if (*ident==NULL&&strcmp(*name,"dynahash")==0)
5959
{
6060
*name=*ident;
6161
*ident=NULL;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp