pgsql: Fix a theoretical memory leak in pg_password_sendauth(). - Mailing list pgsql-committers

From neilc@svr1.postgresql.org (Neil Conway)
Subject pgsql: Fix a theoretical memory leak in pg_password_sendauth().
Date
Msg-id 20050630015920.ACFFE529B4@svr1.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix a theoretical memory leak in pg_password_sendauth(). If the first
malloc() succeeded but the second failed, the buffer allocated by the
first malloc() would be leaked. Fix this by allocating both buffers
via a single malloc(), as suggested by Tom.

Per Coverity static analysis performed by EnterpriseDB.

Modified Files:
--------------
    pgsql/src/interfaces/libpq:
        fe-auth.c (r1.102 -> r1.103)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-auth.c.diff?r1=1.102&r2=1.103)

pgsql-committers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: pgsql: More cleanup on roles patch.
Next
From: jwp@pgfoundry.org (James William Pye)
Date:
Subject: python - be: add install_so to install's subcommand list.