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
60a0c710
Commit
60a0c710
authored
Jan 12, 2013
by
Eli Bendersky
Browse files
Options
Browse Files
Download
Plain Diff
Issue #16076: check for return value of PyTuple_New for args (following
Coverity report) and cleanup code.
parents
0f3735b8
799e3eda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
Modules/_elementtree.c
Modules/_elementtree.c
+11
-8
No files found.
Modules/_elementtree.c
View file @
60a0c710
...
...
@@ -950,19 +950,22 @@ element_setstate_from_Python(ElementObject *self, PyObject *state)
PICKLED_TAIL
,
PICKLED_CHILDREN
,
0
};
PyObject
*
args
;
PyObject
*
tag
,
*
attrib
,
*
text
,
*
tail
,
*
children
;
int
error
;
PyObject
*
retval
;
/* More instance dict members than we know to handle? */
tag
=
attrib
=
text
=
tail
=
children
=
NULL
;
args
=
PyTuple_New
(
0
);
error
=
!
PyArg_ParseTupleAndKeywords
(
args
,
state
,
"|$OOOOO"
,
kwlist
,
&
tag
,
&
attrib
,
&
text
,
&
tail
,
&
children
);
Py_DECREF
(
args
);
if
(
error
)
if
(
!
args
)
return
NULL
;
if
(
PyArg_ParseTupleAndKeywords
(
args
,
state
,
"|$OOOOO"
,
kwlist
,
&
tag
,
&
attrib
,
&
text
,
&
tail
,
&
children
))
retval
=
element_setstate_from_attributes
(
self
,
tag
,
attrib
,
text
,
tail
,
children
);
else
return
element_setstate_from_attributes
(
self
,
tag
,
attrib
,
text
,
tail
,
children
);
retval
=
NULL
;
Py_DECREF
(
args
);
return
retval
;
}
static
PyObject
*
...
...
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