From a11e4c13b1774a9fe463518b2a2a4e24f4da84d0 Mon Sep 17 00:00:00 2001
From: Neal Norwitz <nnorwitz@gmail.com>
Date: Sun, 23 Mar 2003 14:31:01 +0000
Subject: SF patch #708201, unchecked return value in import.c by Jason Harper

Will backport.
---
 Python/import.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Python/import.c b/Python/import.c
index 2038cfd..010e821 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1924,6 +1924,8 @@ PyImport_ImportModule(char *name)
 	PyObject *result;
 
 	pname = PyString_FromString(name);
+	if (pname == NULL)
+		return NULL;
 	result = PyImport_Import(pname);
 	Py_DECREF(pname);
 	return result;
-- 
cgit v0.12

