| От | Tom Lane |
|---|---|
| Тема | pgsql: Clean up callers of JsonbIteratorNext(). |
| Дата | |
| Msg-id | E1f7khC-0003az-Qg@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Clean up callers of JsonbIteratorNext(). Coverity complained about the lack of a check on the return value in parse_jsonb_index_flags' last call of JsonbIteratorNext. Seems like a reasonable gripe to me, especially since the code is depending on that being WJB_DONE to not leak memory, so add a check. In passing, improve a couple other places where the result was being ignored, either by adding an assert or at least a cast to void. Also, don't spell "WJB_DONE" as "0". That's horrid coding style, and it wasn't consistent either. Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f8a187bdbae6e9d3b7407c0c37e3494518496200 Modified Files -------------- src/backend/utils/adt/jsonfuncs.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера