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)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 7 Oct 2010 04:48:29 +0000 (15:18 +1030)
commit09369aa86e233a58ed131fa5b7584b6c86527d40
treef63e5189afffd5a3dd2e98af373c911000988475
parentce84abcc6be31554da73920280e6bfc5b63b1464
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