xbmc: update to xbmc-13-a1cab7a

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2014-03-15 04:12:21 +01:00
parent 540169148a
commit 68e9c5428f
2 changed files with 1 additions and 37 deletions

View File

@ -17,7 +17,7 @@
################################################################################
PKG_NAME="xbmc"
PKG_VERSION="13-86de5b5"
PKG_VERSION="13-a1cab7a"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"

View File

@ -1,36 +0,0 @@
From f164b7c43efa55d8132eaeaba6ea2cfecd47a4de Mon Sep 17 00:00:00 2001
From: Daniel Burr <dburr@topcon.com>
Date: Fri, 28 Feb 2014 04:36:16 +0100
Subject: [PATCH] Fix memory leakage in python bindings
The python bindings generated by the groovy code generator contain a reference counting bug which results in a memory leak whenever a std::vector is converted to a python list. The following member functions are affected:
* xbmcvfs.listdir
* xbmc.Player.getAvailableSubtitleStreams
* xbmc.Player.getAvailableAudioStreams
* xbmcgui.Control.getPosition
* xbmcgui.Dialog.browse
* xbmcgui.Dialog.browseMultiple
The reference counting bug occurs because PyList_Append() increments the reference count of the item, so the caller needs to call Py_DECREF() because it no longer owns the object.
This bug is especially problematic when running the Watchdog Service Addon since it may result in frequent calls to xbmcvfs.listdir, and each call can leak many kilobytes of data when listing directories containing many files.
---
xbmc/interfaces/python/typemaps/python.vector.outtm | 1 +
1 file changed, 1 insertion(+)
diff --git a/xbmc/interfaces/python/typemaps/python.vector.outtm b/xbmc/interfaces/python/typemaps/python.vector.outtm
index a841283..69dffe8 100644
--- a/xbmc/interfaces/python/typemaps/python.vector.outtm
+++ b/xbmc/interfaces/python/typemaps/python.vector.outtm
@@ -41,6 +41,7 @@
PyObject* pyentry${seq};
${helper.getOutConversion(vectype,'result',method,[ 'result' : 'pyentry' + seq, 'api' : 'entry' + seq, 'sequence' : sequence ])}
PyList_Append(${result}, pyentry${seq});
+ Py_DECREF(pyentry${seq});
}
<%
if (ispointer)
--
1.8.5.5