From f5b94894516f4aa650a92cd05ec23d7813996faa Mon Sep 17 00:00:00 2001 From: Alexandra Pervushina Date: Thu, 27 Apr 2023 13:48:50 +0300 Subject: [PATCH] Fix dsa_allocate for aqo_qtext_store to avoid segfault when out of memory --- storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage.c b/storage.c index 17f97555..bf004199 100644 --- a/storage.c +++ b/storage.c @@ -1111,7 +1111,7 @@ aqo_qtext_store(uint64 queryid, const char *query_string) entry->queryid = queryid; size = size > querytext_max_size ? querytext_max_size : size; - entry->qtext_dp = dsa_allocate(qtext_dsa, size); + entry->qtext_dp = dsa_allocate0(qtext_dsa, size); if (!_check_dsa_validity(entry->qtext_dp)) {