Dont mix the raw/non-raw malloc/free for pagerhist

This commit is contained in:
Kovid Goyal 2020-11-13 08:12:26 +05:30
parent 9b32842f66
commit 792a3e7db8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -63,7 +63,7 @@ alloc_pagerhist(size_t pagerhist_sz) {
if (!ph) return NULL;
ph->max_sz = pagerhist_sz;
ph->buffer_size = MIN(1024u*1024u, ph->max_sz);
ph->buffer = PyMem_RawMalloc(ph->buffer_size);
ph->buffer = PyMem_Malloc(ph->buffer_size);
if (!ph->buffer) { PyMem_Free(ph); return NULL; }
return ph;
}