pytdb: Check errors after PyObject_New() calls
authorKirill Smelkov <kirr@landau.phys.spbu.ru>
Sat, 2 Oct 2010 13:43:50 +0000 (17:43 +0400)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 2 Oct 2010 20:53:27 +0000 (22:53 +0200)
commitab37c48e57a16f69c6b926dbed6d4c1a50bb3fb9
tree4a264cd560d584735ab27c8a3a8c8711e8c2147e
parentbdd6bef5dd839ca6fb2d610b84098d2026bb6db1
pytdb: Check errors after PyObject_New() calls

The call could fail with e.g. MemoryError, and we'll dereference NULL
pointer without checking.

Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
lib/tdb/pytdb.c