bpo-36356: Fix memory leak in _PyPreConfig_Read() (GH-12425)
_PyPreConfig_Read() now free 'old_old' at exit.
This commit is contained in:
parent
5f1e8b4d24
commit
e130a07eb2
@ -0,0 +1 @@
|
|||||||
|
Fix leaks that led to build failure when configured with address sanitizer.
|
@ -514,6 +514,7 @@ _PyPreConfig_Read(_PyPreConfig *config)
|
|||||||
err = preconfig_read(config, NULL);
|
err = preconfig_read(config, NULL);
|
||||||
|
|
||||||
setlocale(LC_CTYPE, old_loc);
|
setlocale(LC_CTYPE, old_loc);
|
||||||
|
PyMem_RawFree(old_loc);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user