Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
782c4cf1
Commit
782c4cf1
authored
Mar 13, 2014
by
Jesus Cea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Closes #20908: Memory leak in Reg2Py()
parent
45fc8713
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
PC/winreg.c
PC/winreg.c
+4
-1
No files found.
PC/winreg.c
View file @
782c4cf1
...
@@ -943,8 +943,10 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
...
@@ -943,8 +943,10 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
fixupMultiSZ
(
str
,
data
,
len
);
fixupMultiSZ
(
str
,
data
,
len
);
obData
=
PyList_New
(
s
);
obData
=
PyList_New
(
s
);
if
(
obData
==
NULL
)
if
(
obData
==
NULL
)
{
free
(
str
);
return
NULL
;
return
NULL
;
}
for
(
index
=
0
;
index
<
s
;
index
++
)
for
(
index
=
0
;
index
<
s
;
index
++
)
{
{
size_t
len
=
wcslen
(
str
[
index
]);
size_t
len
=
wcslen
(
str
[
index
]);
...
@@ -952,6 +954,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
...
@@ -952,6 +954,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
PyErr_SetString
(
PyExc_OverflowError
,
PyErr_SetString
(
PyExc_OverflowError
,
"registry string is too long for a Python string"
);
"registry string is too long for a Python string"
);
Py_DECREF
(
obData
);
Py_DECREF
(
obData
);
free
(
str
);
return
NULL
;
return
NULL
;
}
}
PyList_SetItem
(
obData
,
PyList_SetItem
(
obData
,
...
...
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