RE: [PATCH] Memory leak, at src/common/exec.c - Mailing list pgsql-hackers

From Ranier Vilela
Subject RE: [PATCH] Memory leak, at src/common/exec.c
Date
Msg-id SN2PR05MB264066382E2CC75E734492C8E3510@SN2PR05MB2640.namprd05.prod.outlook.com
Whole thread Raw
In response to [PATCH] Memory leak, at src/common/exec.c  (Ranier Vilela <ranier_gyn@hotmail.com>)
Responses Re: [PATCH] Memory leak, at src/common/exec.c
RE: [PATCH] Memory leak, at src/common/exec.c
List pgsql-hackers
According to the documentation at:

https://wiki.sei.cmu.edu/confluence/display/c/POS34-C.+Do+not+call+putenv%28%29+with+a+pointer+to+an+automatic+variable+as+the+argument
"Using setenv() is easier and consequently less error prone than using putenv()."
putenv is problematic and error prone, better replace by setenv.

As a result, set_pglocale_pgservice, is much simpler and more readable.

regards,
Ranier Vilela

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Memory leak, at src/common/exec.c
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Memory leak, at src/common/exec.c