From 1ac754fa10f5d199d19911e21185d0970cb3073f Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Thu, 19 Jan 2006 06:09:39 +0000 Subject: Check return result from Py_InitModule*(). This API can fail. Probably should be backported. --- PC/_subprocess.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'PC/_subprocess.c') diff --git a/PC/_subprocess.c b/PC/_subprocess.c index 8ed4899d8c..b675b88462 100644 --- a/PC/_subprocess.c +++ b/PC/_subprocess.c @@ -553,6 +553,8 @@ init_subprocess() sp_handle_as_number.nb_int = (unaryfunc) sp_handle_as_int; m = Py_InitModule("_subprocess", sp_functions); + if (m == NULL) + return; d = PyModule_GetDict(m); /* constants */ -- cgit v1.2.1