pgsql: Avoid useless malloc/free traffic around getFormattedTypeName().
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Avoid useless malloc/free traffic around getFormattedTypeName(). |
| Дата | |
| Msg-id | E1mO2xW-0001d4-92@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Avoid useless malloc/free traffic around getFormattedTypeName(). Coverity complained that one caller of getFormattedTypeName() failed to free the returned string. Which is true, but rather than fixing that one, let's get rid of this tedious and error-prone requirement. Now that getFormattedTypeName() caches its result, strdup'ing that result and expecting the caller to free it accomplishes little except to waste cycles. We do create a leak in the case where getTypes didn't make a TypeInfo for the type, but that basically shouldn't ever happen. Back-patch, as commit 6c450a861 was. This isn't a particularly interesting bug fix, but the API change seems like a hazard for future back-patching activity if we don't back-patch it. Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/52c300df323e8ebb3d0613baa4711179d9f342f3 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 74 +++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 45 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера