Commit 1fe1204e authored by Tom Lane's avatar Tom Lane

Add missing check for malloc failure in plpgsql_extra_checks_check_hook().

Per report from Andreas Seltenreich.  Back-patch to affected versions.

Report: <874m8nn0hv.fsf@elite.ansel.ydns.eu>
parent e611515d
...@@ -110,6 +110,8 @@ plpgsql_extra_checks_check_hook(char **newvalue, void **extra, GucSource source) ...@@ -110,6 +110,8 @@ plpgsql_extra_checks_check_hook(char **newvalue, void **extra, GucSource source)
} }
myextra = (int *) malloc(sizeof(int)); myextra = (int *) malloc(sizeof(int));
if (!myextra)
return false;
*myextra = extrachecks; *myextra = extrachecks;
*extra = (void *) myextra; *extra = (void *) myextra;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment