--- src/pyvorbisfile.c 2007-05-14 22:41:05.000000000 +0400 +++ src/pyvorbisfile.c.new 2007-05-14 22:45:20.000000000 +0400 @@ -173,9 +173,7 @@ if (ret == NULL) { PyObject_Del(newobj); return NULL; - } else - Py_DECREF(ret); - + } return (PyObject *) newobj; } @@ -191,10 +189,10 @@ close */ Py_DECREF(py_self->py_file); } else { - /* Otherwise, we opened the file and should close it. */ - fclose(py_self->c_file); + /* Do NOT close the file -- ov_open() takes ownership of the FILE*, + and ov_close() is responsible for closing it. */ } - + free(py_self->ovf); PyObject_Del(self); }