pgpool2.git / summary / log / commit / refs

commit    d5561d47055f5cccd35e3e9572d5b3bc4ff01fa0
Author:   Tatsuo Ishii <ishii@sraoss.co.jp>
Date:     Mon Jul 27 10:01:56 2020 +0000

    Fix Coverity warning.
    
    CID 1430580:  Null pointer dereferences  (REVERSE_INULL).
    Patch provided by Hou, Zhijie.


src/utils/pool_select_walker.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils/pool_select_walker.c b/src/utils/pool_select_walker.c index 40b09099d..c53cc4f8c 100644 --- a/src/utils/pool_select_walker.c +++ b/src/utils/pool_select_walker.c @@ -1047,10 +1047,8 @@ is_immutable_function(char *fname) if(!SplitIdentifierString(rawstring, '.', (Node **) &names) || names == NIL) { - if(rawstring) - pfree(rawstring); - if(names) - list_free(names); + pfree(rawstring); + list_free(names); ereport(WARNING, (errmsg("invalid function name %s", fname))); [parent: 680e4d67d178]