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
58c767fa
Commit
58c767fa
authored
Mar 13, 2014
by
Jesus Cea
Browse files
Options
Browse Files
Download
Plain Diff
MERGE: Closes #20908: Memory leak in Reg2Py()
parents
d73721a7
782c4cf1
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 @
58c767fa
...
...
@@ -943,8 +943,10 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
fixupMultiSZ
(
str
,
data
,
len
);
obData
=
PyList_New
(
s
);
if
(
obData
==
NULL
)
if
(
obData
==
NULL
)
{
free
(
str
);
return
NULL
;
}
for
(
index
=
0
;
index
<
s
;
index
++
)
{
size_t
len
=
wcslen
(
str
[
index
]);
...
...
@@ -952,6 +954,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
PyErr_SetString
(
PyExc_OverflowError
,
"registry string is too long for a Python string"
);
Py_DECREF
(
obData
);
free
(
str
);
return
NULL
;
}
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