mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-04 10:38:01 +02: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
def0eae4f2
commit
1d07722f01
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user