summaryrefslogtreecommitdiffstats
path: root/cython/sbservices.pxi
diff options
context:
space:
mode:
Diffstat (limited to 'cython/sbservices.pxi')
-rw-r--r--cython/sbservices.pxi9
1 files changed, 3 insertions, 6 deletions
diff --git a/cython/sbservices.pxi b/cython/sbservices.pxi
index 28aa5a5..13a49aa 100644
--- a/cython/sbservices.pxi
+++ b/cython/sbservices.pxi
@@ -52,7 +52,7 @@ cdef class SpringboardServicesClient(Base):
self.handle_error(err)
except BaseError, e:
if c_node != NULL:
- plist_free(c_node)
+ plist.plist_free(c_node)
raise
return plist.plist_t_to_node(c_node)
def __set__(self, plist.Node newstate not None):
@@ -60,7 +60,6 @@ cdef class SpringboardServicesClient(Base):
cpdef bytes get_pngdata(self, bytes bundleId):
cdef:
- bytes result
char* pngdata = NULL
uint64_t pngsize
sbservices_error_t err
@@ -68,8 +67,6 @@ cdef class SpringboardServicesClient(Base):
try:
self.handle_error(err)
except BaseError, e:
+ stdlib.free(pngdata)
raise
- finally:
- result = pngdata[:pngsize]
- free(pngdata)
- return result
+ return pngdata[:pngsize]