Skip to content

Commit 1fe1204

Browse files
committed
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>
1 parent e611515 commit 1fe1204

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pl/plpgsql/src/pl_handler.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ plpgsql_extra_checks_check_hook(char **newvalue, void **extra, GucSource source)
110110
}
111111

112112
myextra = (int *) malloc(sizeof(int));
113+
if (!myextra)
114+
return false;
113115
*myextra = extrachecks;
114116
*extra = (void *) myextra;
115117

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy