use calloc instead

This commit is contained in:
iceman1001 committed 2022-01-09 00:33:33 +01:00
1 parent 0254b2a63a
commit fe9348768d
22 files changed
+70 -69

No files matched your search

+1 -1
View File
@@ -1912,7 +1912,7 @@ SWIGRUNTIME PyObject *
SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) {
SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
if (sobj) {
void *pack = malloc(size);
void *pack = calloc(1, size);
if (pack) {
memcpy(pack, ptr, size);
sobj->pack = pack;