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)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Fri, 8 Oct 2010 02:00:08 +0000 (13:00 +1100)
commita39000f0155789aa690298ddbc4691b9501475cc
treeda19f17a5a7a73f807c89f79bdecdc4458347402
parentce27a237bd2e60298ee7187d50e4c041e2a22c38
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