BUG #18845: DEREF_OF_NULL.RET guc_malloc possibly returns NULL

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #18845: DEREF_OF_NULL.RET guc_malloc possibly returns NULL
Дата
Msg-id 18845-582c6e10247377ec@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #18845: DEREF_OF_NULL.RET guc_malloc possibly returns NULL
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18845
Logged by:          Nikita
Email address:      pm91.arapov@gmail.com
PostgreSQL version: 16.6
Operating system:   ubuntu 20.04
Description:

guc_malloc possibly returns NULL, if no memory
I suggest the following patch fixing this issue

diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
--- a/src/backend/commands/user.c    (revision
a49ac80219c6f28c3cf3973f797de637329952da)
+++ b/src/backend/commands/user.c    (date 1740386879158)
@@ -2553,7 +2553,7 @@
     pfree(rawstring);
     list_free(elemlist);
 
-    result = (unsigned *) guc_malloc(LOG, sizeof(unsigned));
+    result = (unsigned *) guc_malloc(FATAL, sizeof(unsigned));
     *result = options;
     *extra = result;


В списке pgsql-bugs по дате отправления: