X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=python%2Fguestfs-py-byhand.c;h=53c2e98c91f1fe9f8e0465440c9ba3d277813a5a;hp=29be83b7a5f5f35b9834caf467aef98ea73423cb;hb=HEAD;hpb=f24494195ab8541fda7236afb37a4f897c9bcee5 diff --git a/python/guestfs-py-byhand.c b/python/guestfs-py-byhand.c index 29be83b..53c2e98 100644 --- a/python/guestfs-py-byhand.c +++ b/python/guestfs-py-byhand.c @@ -76,6 +76,7 @@ py_guestfs_close (PyObject *self, PyObject *args) for (i = 0; i < len; ++i) Py_XDECREF (callbacks[i]); + free (callbacks); Py_INCREF (Py_None); return Py_None; @@ -168,7 +169,7 @@ py_guestfs_set_event_callback (PyObject *self, PyObject *args) snprintf (key, sizeof key, "_python_event_%d", eh); guestfs_set_private (g, key, py_callback); - py_eh = PyInt_FromLong ((long) eh); + py_eh = PyLong_FromLong ((long) eh); return py_eh; }