Skip to content

Commit 9925d39

Browse files
committed
fix allocation of memory in test
1 parent 312e9ca commit 9925d39

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python.test/src/tests/cpyext

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python.test/src/tests/cpyext/test_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def test_str_subclass(self):
484484
* PyObject_New() so we are able to allocate space for the object and
485485
* it's data buffer.
486486
*/
487-
obj = (PyUnicodeObject *) malloc(struct_size + (size + 1) * char_size);
487+
obj = (PyUnicodeObject *) PyObject_MALLOC(struct_size + (size + 1) * char_size);
488488
if (obj == NULL)
489489
return NULL;
490490
obj = (PyUnicodeObject *) PyObject_INIT(obj, testStrSubclassPtr);

0 commit comments

Comments
 (0)