[Python-checkins] python/dist/src/Modules posixmodule.c, 2.340, 2.341

nnorwitz@users.sourceforge.net nnorwitz at users.sourceforge.net
Mon Sep 19 08:43:47 CEST 2005


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2648/Modules

Modified Files:
	posixmodule.c 
Log Message:
Forward port fixes for problems reported by valgrind

Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.340
retrieving revision 2.341
diff -u -d -r2.340 -r2.341
--- posixmodule.c	14 Sep 2005 20:51:40 -0000	2.340
+++ posixmodule.c	19 Sep 2005 06:43:44 -0000	2.341
@@ -1179,6 +1179,7 @@
 	Py_BEGIN_ALLOW_THREADS
 	res = access(path, mode);
 	Py_END_ALLOW_THREADS
+	PyMem_Free(path);
 	return(PyBool_FromLong(res == 0));
 }
 
@@ -3012,7 +3013,7 @@
 static PyObject *
 posix_forkpty(PyObject *self, PyObject *noargs)
 {
-	int master_fd, pid;
+	int master_fd = -1, pid;
 
 	pid = forkpty(&master_fd, NULL, NULL, NULL);
 	if (pid == -1)



More information about the Python-checkins mailing list