git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5a90740)
Fix thinko in allocation call during MVC list deserialization
Mon, 1 Apr 2019 05:16:27 +0000 (14:16 +0900)
Mon, 1 Apr 2019 05:16:27 +0000 (14:16 +0900)
Spotted by Coverity.


diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index 90e639ba0a326b3f788195b8fd171f91bdda6371..d1af5d84d0036a7a8832cc63b5eaa38f6ce07f40 100644 (file)
--- 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++)
{
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /