Re: Clang 3.3 Analyzer Results

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Peter Geoghegan <pg(at)heroku(dot)com>, "noloader(at)gmail(dot)com" <noloader(at)gmail(dot)com>, Tomas Vondra <tv(at)fuzzy(dot)cz>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clang 3.3 Analyzer Results
Date: 2013-11-13 17:43:00
Message-ID: 17590.1384364580@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Kevin Grittner <kgrittn(at)ymail(dot)com> writes:
> If nobody objects, I'll fix that small memory leak in the
> regression test driver. Hopefully someone more familiar with
> pg_basebackup will fix the double-free (and related problems
> mentioned by Tom) in streamutil.c.

Here's a less convoluted (IMHO) approach to the password management logic
in streamutil.c. One thing I really didn't care for about the existing
coding is that the loop-for-password included all the rest of the
function, even though there's no intention to retry for any purpose except
collecting a password. So I moved up the bottom of the loop. For ease of
review, I've not reindented the code below the new loop bottom, but would
do so before committing.

Any objections to this version?

regards, tom lane

Attachment Content-Type Size
streamutil-password-fix.patch text/x-diff 3.0 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2013-11-13 19:21:04 Re: Partitioned table question
Previous Message Janek Sendrowski 2013-11-13 17:37:50 pg_trgm module: no convertion into Trigrams on one side when comparing

Browse pgsql-hackers by date

  From Date Subject
Next Message Mika Eloranta 2013-11-13 18:51:37 [PATCH] pg_basebackup: progress report max once per second
Previous Message J Smith 2013-11-13 17:29:37 Re: Errors on missing pg_subtrans/ files with 9.3