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