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
29b964d0
Kaydet (Commit)
29b964d0
authored
Nis 01, 2012
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #13019: Fix potential reference leaks in bytearray.extend().
Patch by Suman Saha.
üst
2d95c4e8
58bb82e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
NEWS
Misc/NEWS
+3
-0
bytearrayobject.c
Objects/bytearrayobject.c
+6
-2
No files found.
Misc/NEWS
Dosyayı görüntüle @
29b964d0
...
@@ -10,6 +10,9 @@ What's New in Python 3.3.0 Alpha 2?
...
@@ -10,6 +10,9 @@ What's New in Python 3.3.0 Alpha 2?
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #13019: Fix potential reference leaks in bytearray.extend(). Patch
by Suman Saha.
- Issue #1683368: object.__new__ and object.__init__ raise a TypeError if they
- Issue #1683368: object.__new__ and object.__init__ raise a TypeError if they
are passed arguments and their complementary method is not overridden.
are passed arguments and their complementary method is not overridden.
...
...
Objects/bytearrayobject.c
Dosyayı görüntüle @
29b964d0
...
@@ -2289,8 +2289,10 @@ bytearray_extend(PyByteArrayObject *self, PyObject *arg)
...
@@ -2289,8 +2289,10 @@ bytearray_extend(PyByteArrayObject *self, PyObject *arg)
}
}
bytearray_obj
=
PyByteArray_FromStringAndSize
(
NULL
,
buf_size
);
bytearray_obj
=
PyByteArray_FromStringAndSize
(
NULL
,
buf_size
);
if
(
bytearray_obj
==
NULL
)
if
(
bytearray_obj
==
NULL
)
{
Py_DECREF
(
it
);
return
NULL
;
return
NULL
;
}
buf
=
PyByteArray_AS_STRING
(
bytearray_obj
);
buf
=
PyByteArray_AS_STRING
(
bytearray_obj
);
while
((
item
=
PyIter_Next
(
it
))
!=
NULL
)
{
while
((
item
=
PyIter_Next
(
it
))
!=
NULL
)
{
...
@@ -2323,8 +2325,10 @@ bytearray_extend(PyByteArrayObject *self, PyObject *arg)
...
@@ -2323,8 +2325,10 @@ bytearray_extend(PyByteArrayObject *self, PyObject *arg)
return
NULL
;
return
NULL
;
}
}
if
(
bytearray_setslice
(
self
,
Py_SIZE
(
self
),
Py_SIZE
(
self
),
bytearray_obj
)
==
-
1
)
if
(
bytearray_setslice
(
self
,
Py_SIZE
(
self
),
Py_SIZE
(
self
),
bytearray_obj
)
==
-
1
)
{
Py_DECREF
(
bytearray_obj
);
return
NULL
;
return
NULL
;
}
Py_DECREF
(
bytearray_obj
);
Py_DECREF
(
bytearray_obj
);
Py_RETURN_NONE
;
Py_RETURN_NONE
;
...
...
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