mirror of
https://github.com/postgres/postgres.git
synced 2026-02-27 03:40:28 -05:00
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>
This commit is contained in:
parent
131e50bd98
commit
97567cf045
1 changed files with 2 additions and 0 deletions
|
|
@ -108,6 +108,8 @@ plpgsql_extra_checks_check_hook(char **newvalue, void **extra, GucSource source)
|
|||
}
|
||||
|
||||
myextra = (int *) malloc(sizeof(int));
|
||||
if (!myextra)
|
||||
return false;
|
||||
*myextra = extrachecks;
|
||||
*extra = (void *) myextra;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue