pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/f38a5c28e0f032e6eb9bab7c178f43f0bd2cad8d

link crossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-9c8f61f9f58ad7b2.css" /> Cleanup locale.localeconv(): move Py_DECREF() closer to the error · python/cpython@f38a5c2 · GitHub
Skip to content

Commit f38a5c2

Browse files
committed
Cleanup locale.localeconv(): move Py_DECREF() closer to the error
1 parent 1ce3f84 commit f38a5c2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Modules/_localemodule.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ PyLocale_localeconv(PyObject* self)
151151
do { \
152152
if (obj == NULL) \
153153
goto failed; \
154-
if (PyDict_SetItemString(result, key, obj) < 0) \
154+
if (PyDict_SetItemString(result, key, obj) < 0) { \
155+
Py_DECREF(obj); \
155156
goto failed; \
157+
} \
156158
Py_DECREF(obj); \
157159
} while (0)
158160

@@ -196,7 +198,6 @@ PyLocale_localeconv(PyObject* self)
196198

197199
failed:
198200
Py_XDECREF(result);
199-
Py_XDECREF(x);
200201
return NULL;
201202
}
202203

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy