libpq: Remove redundant null pointer checks before free() - Mailing list pgsql-hackers

From Peter Eisentraut
Subject libpq: Remove redundant null pointer checks before free()
Date
Msg-id dac5d2d0-98f5-94d9-8e69-46da2413593d@enterprisedb.com
Whole thread Raw
Responses Re: libpq: Remove redundant null pointer checks before free()
List pgsql-hackers
libpq contains a lot of

     if (foo)
         free(foo);

calls, where the "if" part is unnecessary.  This is of course pretty 
harmless, but some functions like scram_free() and freePGconn() have 
become so bulky that it becomes annoying.  So while I was doing some 
work in that area I undertook to simplify this.
Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: SGML doc file references
Next
From: Bruce Momjian
Date:
Subject: Re: Typo in ro.po file?