diff options
author | Fujii Masao <fujii@postgresql.org> | 2014-09-05 02:17:57 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2014-09-05 02:19:45 +0900 |
commit | 78b1228efeb5d2615f7e844cb4fe8ad8ff335e29 (patch) | |
tree | 9a326c0e37e79649ae8cfabf64fd709b0c5c8874 /src | |
parent | 9c4b7ed13da24cdb2f977547546bb6be437d1974 (diff) |
Fix segmentation fault that an empty prepared statement could cause.
Back-patch to all supported branches.
Per bug #11335 from Haruka Takatsuka
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/tcop/utility.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index c76e7bb0fec..81e832506af 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -2184,6 +2184,9 @@ GetCommandLogLevel(Node *parsetree) { LogStmtLevel lev; + if (parsetree == NULL) + return LOGSTMT_ALL; + switch (nodeTag(parsetree)) { /* raw plannable queries */ |