mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #9422: Fix memory leak when re-initializing a struct.Struct object.
This commit is contained in:
parent
0a0fc07d37
commit
cf28b95800
2 changed files with 5 additions and 0 deletions
|
@ -1492,6 +1492,8 @@ Library
|
||||||
Extension Modules
|
Extension Modules
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Issue #9422: Fix memory leak when re-initializing a struct.Struct object.
|
||||||
|
|
||||||
- Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly
|
- Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly
|
||||||
compared to other unix systems. In particular, os.getgroups() does
|
compared to other unix systems. In particular, os.getgroups() does
|
||||||
not reflect any changes made using os.setgroups() but basicly always
|
not reflect any changes made using os.setgroups() but basicly always
|
||||||
|
|
|
@ -1247,6 +1247,9 @@ prepare_s(PyStructObject *self)
|
||||||
PyErr_NoMemory();
|
PyErr_NoMemory();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
/* Free any s_codes value left over from a previous initialization. */
|
||||||
|
if (self->s_codes != NULL)
|
||||||
|
PyMem_FREE(self->s_codes);
|
||||||
self->s_codes = codes;
|
self->s_codes = codes;
|
||||||
|
|
||||||
s = fmt;
|
s = fmt;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue