Re: Patch a potential memory leak in describeOneTableDetails()
От | Daniel Gustafsson |
---|---|
Тема | Re: Patch a potential memory leak in describeOneTableDetails() |
Дата | |
Msg-id | F4F3D3F5-16A9-49F2-BB33-D8DAC6061742@yesql.se обсуждение исходный текст |
Ответ на | Re: Patch a potential memory leak in describeOneTableDetails() (Kyotaro Horiguchi <horikyota.ntt@gmail.com>) |
Ответы |
Re: Patch a potential memory leak in describeOneTableDetails()
|
Список | pgsql-hackers |
> On 21 Feb 2022, at 09:30, Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote: > (However, I got a mysterious -Wmisleading-indentation warning with this..) > >> describe.c: In function ‘describeOneTableDetails’: >> describe.c:3420:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] >> if (tableinfo.relam) >> ^~ >> describe.c:3423:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ >> if (res) > ^~ I think it's because you've indented your new code differently from the existing, such that the if (res) clause is indented equally to the previous pg_free(tableinfo.relam) call, making it look like they are in the same block: > + if (tableinfo.relam) > + pg_free(tableinfo.relam); > > if (res) > PQclear(res); -- Daniel Gustafsson https://vmware.com/
В списке pgsql-hackers по дате отправления: