Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
99439266
Kaydet (Commit)
99439266
authored
Kas 26, 2010
tarafından
Stefan Krah
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #10383: Fix two leaks.
üst
fe12390b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
posixmodule.c
Modules/posixmodule.c
+11
-7
No files found.
Modules/posixmodule.c
Dosyayı görüntüle @
99439266
...
...
@@ -5620,8 +5620,10 @@ posix_read(PyObject *self, PyObject *args)
buffer
=
PyBytes_FromStringAndSize
((
char
*
)
NULL
,
size
);
if
(
buffer
==
NULL
)
return
NULL
;
if
(
!
_PyVerify_fd
(
fd
))
if
(
!
_PyVerify_fd
(
fd
))
{
Py_DECREF
(
buffer
);
return
posix_error
();
}
Py_BEGIN_ALLOW_THREADS
n
=
read
(
fd
,
PyBytes_AS_STRING
(
buffer
),
size
);
Py_END_ALLOW_THREADS
...
...
@@ -5648,12 +5650,14 @@ posix_write(PyObject *self, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"iy*:write"
,
&
fd
,
&
pbuf
))
return
NULL
;
if
(
!
_PyVerify_fd
(
fd
))
if
(
!
_PyVerify_fd
(
fd
))
{
PyBuffer_Release
(
&
pbuf
);
return
posix_error
();
}
Py_BEGIN_ALLOW_THREADS
size
=
write
(
fd
,
pbuf
.
buf
,
(
size_t
)
pbuf
.
len
);
Py_END_ALLOW_THREADS
PyBuffer_Release
(
&
pbuf
);
PyBuffer_Release
(
&
pbuf
);
if
(
size
<
0
)
return
posix_error
();
return
PyLong_FromSsize_t
(
size
);
...
...
@@ -6540,10 +6544,10 @@ posix_pathconf(PyObject *self, PyObject *args)
limit
=
pathconf
(
path
,
name
);
if
(
limit
==
-
1
&&
errno
!=
0
)
{
if
(
errno
==
EINVAL
)
/* could be a path or name problem */
posix_error
();
/* could be a path or name problem */
posix_error
();
else
posix_error_with_filename
(
path
);
posix_error_with_filename
(
path
);
}
else
result
=
PyLong_FromLong
(
limit
);
...
...
@@ -6724,7 +6728,7 @@ posix_confstr(PyObject *self, PyObject *args)
PyObject
*
result
=
NULL
;
int
name
;
char
buffer
[
255
];
int
len
;
int
len
;
if
(
!
PyArg_ParseTuple
(
args
,
"O&:confstr"
,
conv_confstr_confname
,
&
name
))
return
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment