postgrespro.git / summary / log / commit / refs
commit 4ae7f02b0364ccba49a82efbfff46125fb357d6c
Author: Michael Paquier <michael@paquier.xyz>
Date: Mon Apr 01 05:16:27 2019 +0000
Fix thinko in allocation call during MVC list deserialization
Spotted by Coverity.
src/backend/statistics/mcv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index 90e639ba0a..d1af5d84d0 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -908,7 +908,7 @@ statext_mcv_deserialize(bytea *data)
* original values (it might go away).
*/
datalen = 0; /* space for by-ref data */
- map = (Datum **) palloc(ndims * sizeof(Datum **));
+ map = (Datum **) palloc(ndims * sizeof(Datum *));
for (dim = 0; dim < ndims; dim++)
{
[parent: 5a907404b527]