pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add missing pointer dereference in pg_backend_memory_contexts vi
Date: Sun, 28 Jul 2024 21:53:38 +0000
Message-ID: <E1sYBpi-001ekM-SP@gemulon.postgresql.org> (raw)

Add missing pointer dereference in pg_backend_memory_contexts view

32d3ed816 moved the logic for setting the context's name and ident into
a reusable function.  I missed adding a pointer dereference after
copying and pasting the code into that function.  The ident parameter is
a pointer to the ident variable in the calling function, so the
dereference is required to correctly determine if the contents of that
variable is NULL or not.

In passing, adjust the if condition to include an == NULL to make it
more clear that it's not checking for == '\0'.

Reported-by: Tom Lane, Coverity
Discussion: https://postgr.es/m/2256588.1722184287@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/da87dc07f16e7435edc601661a6ec71b38bccd25

Modified Files
--------------
src/backend/utils/adt/mcxtfuncs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



Message-ID: <E1sYBpi-001ekM-SP@gemulon.postgresql.org>
Permalink:  ../E1sYBpi-001ekM-SP@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sYBpi-001ekM-SP@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add missing pointer dereference in pg_backend_memory_contexts vi
  In-Reply-To: <E1sYBpi-001ekM-SP@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox