Skip to content

Commit 1871b04

Browse files
committed
trick clang analyzer (dereference of NULL pointer)
1 parent 115296a commit 1871b04

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/pg_pathman.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,17 @@ make_inh_translation_list(Relation oldrelation, Relation newrelation,
239239
for (new_attno = 0; new_attno < newnatts; new_attno++)
240240
{
241241
att = new_tupdesc->attrs[new_attno];
242+
243+
/*
244+
* Make clang analyzer happy:
245+
*
246+
* Access to field 'attisdropped' results
247+
* in a dereference of a null pointer
248+
*/
249+
if (!att)
250+
elog(ERROR, "error in function "
251+
CppAsString(make_inh_translation_list));
252+
242253
if (!att->attisdropped && att->attinhcount != 0 &&
243254
strcmp(attname, NameStr(att->attname)) == 0)
244255
break;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy