summaryrefslogtreecommitdiff
path: root/community/pyvorbis/pyogg-ticket2-fix.patch
blob: b518b363841f918d05b8578d45501ef0bfa175c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
 }