[pywin32-checkins] pywin32/win32/src win32file.i,1.101,1.102
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: Roger U. <ru...@us...> - 2009-02-01 21:11:10
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8527 Modified Files: win32file.i Log Message: Fix refcount leak in ConnectEx Index: win32file.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** win32file.i 1 Feb 2009 17:12:49 -0000 1.101 --- win32file.i 1 Feb 2009 21:11:01 -0000 1.102 *************** *** 1793,1797 **** PyObject *hobj = NULL; PyObject *pobj = (PyObject *)NULL; ! PyObject *idna = NULL; struct addrinfo hints, *res; --- 1793,1797 ---- PyObject *hobj = NULL; PyObject *pobj = (PyObject *)NULL; ! TmpPyObject host_idna; struct addrinfo hints, *res; *************** *** 1802,1809 **** hptr = NULL; } else if (PyUnicode_Check(hobj)) { ! idna = PyObject_CallMethod(hobj, "encode", "s", "idna"); ! if (!idna) return NULL; ! hptr = PyString_AsString(idna); } else if (PyString_Check(hobj)) { hptr = PyString_AsString(hobj); --- 1802,1809 ---- hptr = NULL; } else if (PyUnicode_Check(hobj)) { ! host_idna = PyObject_CallMethod(hobj, "encode", "s", "idna"); ! if (!host_idna) return NULL; ! hptr = PyString_AsString(host_idna); } else if (PyString_Check(hobj)) { hptr = PyString_AsString(hobj); |