summaryrefslogtreecommitdiff
path: root/community/pyvorbis/pyogg-ticket2-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/pyvorbis/pyogg-ticket2-fix.patch')
-rw-r--r--community/pyvorbis/pyogg-ticket2-fix.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/community/pyvorbis/pyogg-ticket2-fix.patch b/community/pyvorbis/pyogg-ticket2-fix.patch
new file mode 100644
index 000000000..b518b3638
--- /dev/null
+++ b/community/pyvorbis/pyogg-ticket2-fix.patch
@@ -0,0 +1,27 @@
+--- 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);
+ }
+