summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-27 03:22:50 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-27 03:22:50 (GMT)
commit247b5154ac37c2069d48fc500f06f06ff6763fa1 (patch)
treeb2d9f1d0543d41b4e48d543c96ccdff557a55556 /Objects
parent44c19f64a5b10c4a68aee8757d68c54c9129d757 (diff)
downloadcpython-247b5154ac37c2069d48fc500f06f06ff6763fa1.zip
cpython-247b5154ac37c2069d48fc500f06f06ff6763fa1.tar.gz
cpython-247b5154ac37c2069d48fc500f06f06ff6763fa1.tar.bz2
This adds a leak, but fixes a crash. The leaking code is:
"{0:.{precision}s}".format('hello world', precision=5) I pretty sure it's because of the 'precision' keyword. Still need to investigate further.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/stringlib/string_format.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/stringlib/string_format.h b/Objects/stringlib/string_format.h
index 2799141..4ae7e57 100644
--- a/Objects/stringlib/string_format.h
+++ b/Objects/stringlib/string_format.h
@@ -416,6 +416,7 @@ get_field_object(SubString *input, PyObject *args, PyObject *kwargs)
Py_DECREF(key);
goto error;
}
+ Py_INCREF(obj);
} else {
/* look up in args */
obj = PySequence_GetItem(args, index);