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
f4cc2161
Kaydet (Commit)
f4cc2161
authored
Tem 19, 2012
tarafından
Meador Inge
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #15394: Fix ref leaks in PyModule_Create.
Patch by Julia Lawall.
üst
77d32833
29e49d63
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+3
-0
moduleobject.c
Objects/moduleobject.c
+7
-1
No files found.
Misc/ACKS
Dosyayı görüntüle @
f4cc2161
...
...
@@ -601,6 +601,7 @@ Amos Latteier
Piers Lauder
Ben Laurie
Simon Law
Julia Lawall
Chris Lawrence
Brian Leair
Mathieu Leduc-Hamel
...
...
Misc/NEWS
Dosyayı görüntüle @
f4cc2161
...
...
@@ -10,6 +10,9 @@ What's New in Python 3.3.0 Beta 2?
Core and Builtins
-----------------
- Issue #15394: An issue in PyModule_Create that caused references to
be leaked on some error paths has been fixed. Patch by Julia Lawall.
- Issue #15368: An issue that caused bytecode generation to be
non-deterministic has been fixed.
...
...
Objects/moduleobject.c
Dosyayı görüntüle @
f4cc2161
...
...
@@ -126,8 +126,10 @@ PyModule_Create2(struct PyModuleDef* module, int module_api_version)
d
=
PyModule_GetDict
((
PyObject
*
)
m
);
if
(
module
->
m_methods
!=
NULL
)
{
n
=
PyUnicode_FromString
(
name
);
if
(
n
==
NULL
)
if
(
n
==
NULL
)
{
Py_DECREF
(
m
);
return
NULL
;
}
for
(
ml
=
module
->
m_methods
;
ml
->
ml_name
!=
NULL
;
ml
++
)
{
if
((
ml
->
ml_flags
&
METH_CLASS
)
||
(
ml
->
ml_flags
&
METH_STATIC
))
{
...
...
@@ -135,16 +137,19 @@ PyModule_Create2(struct PyModuleDef* module, int module_api_version)
"module functions cannot set"
" METH_CLASS or METH_STATIC"
);
Py_DECREF
(
n
);
Py_DECREF
(
m
);
return
NULL
;
}
v
=
PyCFunction_NewEx
(
ml
,
(
PyObject
*
)
m
,
n
);
if
(
v
==
NULL
)
{
Py_DECREF
(
n
);
Py_DECREF
(
m
);
return
NULL
;
}
if
(
PyDict_SetItemString
(
d
,
ml
->
ml_name
,
v
)
!=
0
)
{
Py_DECREF
(
v
);
Py_DECREF
(
n
);
Py_DECREF
(
m
);
return
NULL
;
}
Py_DECREF
(
v
);
...
...
@@ -155,6 +160,7 @@ PyModule_Create2(struct PyModuleDef* module, int module_api_version)
v
=
PyUnicode_FromString
(
module
->
m_doc
);
if
(
v
==
NULL
||
PyDict_SetItemString
(
d
,
"__doc__"
,
v
)
!=
0
)
{
Py_XDECREF
(
v
);
Py_DECREF
(
m
);
return
NULL
;
}
Py_DECREF
(
v
);
...
...
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