summaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index ec630b44916..8ad28dce2b7 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -3489,6 +3489,11 @@ check_restrict_nonsystem_relation_kind(char **newval, void **extra, GucSource so
/* Save the flags in *extra, for use by the assign function */
*extra = malloc(sizeof(int));
+ if (*extra == NULL)
+ ereport(ERROR,
+ (errcode(ERRCODE_OUT_OF_MEMORY),
+ errmsg("out of memory")));
+
*((int *) *extra) = flags;
return true;