Hi,

On 2020-04-23 15:20:59 -0300, Ranier Vilela wrote:
> Per Coverity.
> 
> read_controlfile alloc memory with pg_malloc and fail in releasing the
> memory.

Seriously, this is getting really ridiculous. You're posting badly
vetted, often nearly verbatim, coverity reports. Many of them are
obvious false positives. This is just producing noise.

Please stop.


> diff --git a/src/bin/pg_resetwal/pg_resetwal.c 
> b/src/bin/pg_resetwal/pg_resetwal.c
> index 233441837f..673ab0204c 100644
> --- a/src/bin/pg_resetwal/pg_resetwal.c
> +++ b/src/bin/pg_resetwal/pg_resetwal.c
> @@ -608,6 +608,7 @@ read_controlfile(void)
>       len = read(fd, buffer, PG_CONTROL_FILE_SIZE);
>       if (len < 0)
>       {
> +             pg_free(buffer);                
>               pg_log_error("could not read file \"%s\": %m", 
> XLOG_CONTROL_FILE);
>               exit(1);
>       }

There's an exit() two lines later, this is obviously not necessary.

Greetings,

Andres Freund


Reply via email to