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
552be9b2
Kaydet (Commit)
552be9b2
authored
Şub 15, 2012
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #13020: Fix a reference leak when allocating a structsequence object fails.
Patch by Suman Saha.
üst
15af7b4a
4b3c7846
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
NEWS
Misc/NEWS
+3
-0
structseq.c
Objects/structseq.c
+13
-12
No files found.
Misc/NEWS
Dosyayı görüntüle @
552be9b2
...
...
@@ -10,6 +10,9 @@ What's New in Python 3.3 Alpha 1?
Core and Builtins
-----------------
- Issue #13020: Fix a reference leak when allocating a structsequence object
fails. Patch by Suman Saha.
- Issue #13777: Add PF_SYSTEM sockets on OS X.
Patch by Michael Goderbauer.
...
...
Objects/structseq.c
Dosyayı görüntüle @
552be9b2
...
...
@@ -103,32 +103,33 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if
(
min_len
!=
max_len
)
{
if
(
len
<
min_len
)
{
PyErr_Format
(
PyExc_TypeError
,
"%.500s() takes an at least %zd-sequence (%zd-sequence given)"
,
type
->
tp_name
,
min_len
,
len
);
Py_DECREF
(
arg
);
return
NULL
;
"%.500s() takes an at least %zd-sequence (%zd-sequence given)"
,
type
->
tp_name
,
min_len
,
len
);
Py_DECREF
(
arg
);
return
NULL
;
}
if
(
len
>
max_len
)
{
PyErr_Format
(
PyExc_TypeError
,
"%.500s() takes an at most %zd-sequence (%zd-sequence given)"
,
type
->
tp_name
,
max_len
,
len
);
Py_DECREF
(
arg
);
return
NULL
;
"%.500s() takes an at most %zd-sequence (%zd-sequence given)"
,
type
->
tp_name
,
max_len
,
len
);
Py_DECREF
(
arg
);
return
NULL
;
}
}
else
{
if
(
len
!=
min_len
)
{
PyErr_Format
(
PyExc_TypeError
,
"%.500s() takes a %zd-sequence (%zd-sequence given)"
,
type
->
tp_name
,
min_len
,
len
);
Py_DECREF
(
arg
);
return
NULL
;
"%.500s() takes a %zd-sequence (%zd-sequence given)"
,
type
->
tp_name
,
min_len
,
len
);
Py_DECREF
(
arg
);
return
NULL
;
}
}
res
=
(
PyStructSequence
*
)
PyStructSequence_New
(
type
);
if
(
res
==
NULL
)
{
Py_DECREF
(
arg
);
return
NULL
;
}
for
(
i
=
0
;
i
<
len
;
++
i
)
{
...
...
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