pytevent: Better error and reference handling
authorPetr Viktorin <pviktori@redhat.com>
Thu, 4 Dec 2014 11:44:56 +0000 (12:44 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 10 Jun 2015 04:06:18 +0000 (06:06 +0200)
commitf5838df58ea36e64cd0295b595df9cbd10d8c757
treef4ce6ebd841935566d8b60ad3f4cac183b80892f
parent2bf1443bd0f1cb95d11f42db5ef4a7637981ee6b
pytevent: Better error and reference handling

py_backend_list:
- Handle cases of PyString_FromString or PyList_Append failing.
- Properly decrease the reference count of the returned strings.

py_register_backend:
- Decref "name" after use

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
lib/tevent/pytevent.c