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
597696c7
Commit
597696c7
authored
Jul 27, 2013
by
Victor Stinner
Browse files
Options
Browse Files
Download
Plain Diff
(Merge 3.3) Issue #15893: frozenmain.c now handles PyMem_Malloc() failure
parents
b7f1b38d
36577e4e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
Python/frozenmain.c
Python/frozenmain.c
+9
-2
No files found.
Python/frozenmain.c
View file @
597696c7
...
...
@@ -20,9 +20,16 @@ Py_FrozenMain(int argc, char **argv)
int
inspect
=
0
;
int
unbuffered
=
0
;
char
*
oldloc
;
wchar_t
**
argv_copy
=
PyMem_Malloc
(
sizeof
(
wchar_t
*
)
*
argc
)
;
wchar_t
**
argv_copy
;
/* We need a second copies, as Python might modify the first one. */
wchar_t
**
argv_copy2
=
PyMem_Malloc
(
sizeof
(
wchar_t
*
)
*
argc
);
wchar_t
**
argv_copy2
;
argv_copy
=
PyMem_Malloc
(
sizeof
(
wchar_t
*
)
*
argc
);
argv_copy2
=
PyMem_Malloc
(
sizeof
(
wchar_t
*
)
*
argc
);
if
(
!
argv_copy
||
!
argv_copy2
)
{
fprintf
(
stderr
,
"out of memory
\n
"
);
return
1
;
}
Py_FrozenFlag
=
1
;
/* Suppress errors from getpath.c */
...
...
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