Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 17168:0d52358cb288 legacy-trunk
Fix memory leak with SyntaxError. (The DECREF was originally hidden
inside a piece of code that was deemed reduntant; the DECREF was
unfortunately *not* redundant!)
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 23 Mar 2001 04:01:07 +0000 |
| parents | b44e77a12978 |
| children | eb06a02e0507 |
comparison
equal
deleted
inserted
replaced
| 17167:346e978630a9 | 17168:0d52358cb288 |
|---|---|
| 1199 fprintf(stderr, "error=%d\n", err->error); | 1199 fprintf(stderr, "error=%d\n", err->error); |
| 1200 msg = "unknown parsing error"; | 1200 msg = "unknown parsing error"; |
| 1201 break; | 1201 break; |
| 1202 } | 1202 } |
| 1203 w = Py_BuildValue("(sO)", msg, v); | 1203 w = Py_BuildValue("(sO)", msg, v); |
| 1204 Py_XDECREF(v); | |
| 1204 PyErr_SetObject(errtype, w); | 1205 PyErr_SetObject(errtype, w); |
| 1205 Py_XDECREF(w); | 1206 Py_XDECREF(w); |
| 1206 } | 1207 } |
| 1207 | 1208 |
| 1208 /* Print fatal error message and abort */ | 1209 /* Print fatal error message and abort */ |
