aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Ozeritskiy <aozeritsky@ydb.tech>2024-01-23 11:17:38 +0100
committerGitHub <noreply@github.com>2024-01-23 11:17:38 +0100
commitec6c6aadce6a507c6df12a45edba4fca1c389f80 (patch)
tree5f4aefd59aa81e4e929faa5dac1f8e73a7aa6aea
parenteeb8f00506876e55cc786c3a949260d46398f0be (diff)
downloadydb-ec6c6aadce6a507c6df12a45edba4fca1c389f80.tar.gz
Fix malloc size (#1211)
-rw-r--r--ydb/library/yql/sql/pg/optimizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ydb/library/yql/sql/pg/optimizer.cpp b/ydb/library/yql/sql/pg/optimizer.cpp
index 62e7019d75..98e63c465c 100644
--- a/ydb/library/yql/sql/pg/optimizer.cpp
+++ b/ydb/library/yql/sql/pg/optimizer.cpp
@@ -332,7 +332,7 @@ RelOptInfo* TPgOptimizer::JoinSearchInternal() {
root.simple_rel_array_size
* sizeof(RelOptInfo*));
root.simple_rte_array = (RangeTblEntry**)palloc0(
- root.simple_rel_array_size * sizeof(RangeTblEntry)
+ root.simple_rel_array_size * sizeof(RangeTblEntry*)
);
for (int i = 0; i <= rels->length; i++) {
root.simple_rte_array[i] = makeNode(RangeTblEntry);