summaryrefslogtreecommitdiff
path: root/python/arfile.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2010-01-31 21:38:16 +0100
committerJulian Andres Klode <jak@debian.org>2010-01-31 21:38:16 +0100
commitf18aca0bfc380337d99871f6255bd600c70015ca (patch)
tree5b2cd84a6b07b4d26fcaf3a2e95e05170f0b88f6 /python/arfile.cc
parentb78a805564fc9106ad799a5e6863cb2818ef9b2b (diff)
downloadpython-apt-f18aca0bfc380337d99871f6255bd600c70015ca.tar.gz
python/arfile.cc: Handle the case where ararchive_new returns NULL in debfile_new.
Diffstat (limited to 'python/arfile.cc')
-rw-r--r--python/arfile.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/arfile.cc b/python/arfile.cc
index 4f95a791..4f3b4ad7 100644
--- a/python/arfile.cc
+++ b/python/arfile.cc
@@ -523,6 +523,8 @@ static PyObject *_gettar(PyDebFileObject *self, const ARArchive::Member *m,
static PyObject *debfile_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
PyDebFileObject *self = (PyDebFileObject*)ararchive_new(type, args, kwds);
+ if (self == NULL)
+ return NULL;
// DebFile
self->control = _gettar(self, self->Object->FindMember("control.tar.gz"),