Fix a memory leak in yajl.dump().

This commit is contained in:
Eric Peden 2014-05-29 20:00:14 -07:00
parent 52094838b9
commit 110f2ebc03
1 changed files with 1 additions and 0 deletions

1
yajl.c
View File

@ -339,6 +339,7 @@ static PyObject *_internal_stream_dump(PyObject *object, PyObject *stream, unsig
buffer = _internal_encode((_YajlEncoder *)encoder, object, config);
PyObject_CallMethodObjArgs(stream, __write, buffer, NULL);
Py_XDECREF(encoder);
Py_XDECREF(buffer);
return Py_True;
bad_type: