diff options
| author | 2010-04-13 17:12:50 -0500 | |
|---|---|---|
| committer | 2012-03-20 23:25:55 +0100 | |
| commit | 7275b8e8b1134c85d6f4b694ad6f515b3a6dace9 (patch) | |
| tree | 3ab34f9097528839c2c78b70b659ba7d90cf736c /cython/sbservices.pxi | |
| parent | 360b7316b520baeae11c98cbd6423029141c2137 (diff) | |
| download | libimobiledevice-7275b8e8b1134c85d6f4b694ad6f515b3a6dace9.tar.gz libimobiledevice-7275b8e8b1134c85d6f4b694ad6f515b3a6dace9.tar.bz2 | |
Use stdlib.free and plist.plist_free.
Diffstat (limited to 'cython/sbservices.pxi')
| -rw-r--r-- | cython/sbservices.pxi | 9 |
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): | |||
| 52 | self.handle_error(err) | 52 | self.handle_error(err) |
| 53 | except BaseError, e: | 53 | except BaseError, e: |
| 54 | if c_node != NULL: | 54 | if c_node != NULL: |
| 55 | plist_free(c_node) | 55 | plist.plist_free(c_node) |
| 56 | raise | 56 | raise |
| 57 | return plist.plist_t_to_node(c_node) | 57 | return plist.plist_t_to_node(c_node) |
| 58 | def __set__(self, plist.Node newstate not None): | 58 | def __set__(self, plist.Node newstate not None): |
| @@ -60,7 +60,6 @@ cdef class SpringboardServicesClient(Base): | |||
| 60 | 60 | ||
| 61 | cpdef bytes get_pngdata(self, bytes bundleId): | 61 | cpdef bytes get_pngdata(self, bytes bundleId): |
| 62 | cdef: | 62 | cdef: |
| 63 | bytes result | ||
| 64 | char* pngdata = NULL | 63 | char* pngdata = NULL |
| 65 | uint64_t pngsize | 64 | uint64_t pngsize |
| 66 | sbservices_error_t err | 65 | sbservices_error_t err |
| @@ -68,8 +67,6 @@ cdef class SpringboardServicesClient(Base): | |||
| 68 | try: | 67 | try: |
| 69 | self.handle_error(err) | 68 | self.handle_error(err) |
| 70 | except BaseError, e: | 69 | except BaseError, e: |
| 70 | stdlib.free(pngdata) | ||
| 71 | raise | 71 | raise |
| 72 | finally: | 72 | return pngdata[:pngsize] |
| 73 | result = pngdata[:pngsize] | ||
| 74 | free(pngdata) | ||
| 75 | return result | ||
