Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pybison
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
pybison
Commits
2b1f8fd1
Commit
2b1f8fd1
authored
Feb 23, 2012
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed three return value-checks to prevent segfaults.
parent
4fac41ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/c/bison_callback.c
src/c/bison_callback.c
+4
-2
No files found.
src/c/bison_callback.c
View file @
2b1f8fd1
...
@@ -152,6 +152,8 @@ void py_input(PyObject *parser, char *buf, int *result, int max_size)
...
@@ -152,6 +152,8 @@ void py_input(PyObject *parser, char *buf, int *result, int max_size)
Py_DECREF
(
handle
);
Py_DECREF
(
handle
);
Py_DECREF
(
arglist
);
Py_DECREF
(
arglist
);
if
(
unlikely
(
!
res
))
{
return
;
}
}
}
// Read the input string and catch keyboard interrupt exceptions.
// Read the input string and catch keyboard interrupt exceptions.
...
@@ -194,7 +196,7 @@ void py_input(PyObject *parser, char *buf, int *result, int max_size)
...
@@ -194,7 +196,7 @@ void py_input(PyObject *parser, char *buf, int *result, int max_size)
res
=
PyObject_CallObject
(
handle
,
arglist
);
res
=
PyObject_CallObject
(
handle
,
arglist
);
Py_DECREF
(
res
);
Py_
X
DECREF
(
res
);
Py_DECREF
(
handle
);
Py_DECREF
(
handle
);
Py_DECREF
(
arglist
);
Py_DECREF
(
arglist
);
...
@@ -224,7 +226,7 @@ finish_input:
...
@@ -224,7 +226,7 @@ finish_input:
res
=
PyObject_CallObject
(
handle
,
arglist
);
res
=
PyObject_CallObject
(
handle
,
arglist
);
Py_DECREF
(
res
);
Py_
X
DECREF
(
res
);
Py_DECREF
(
handle
);
Py_DECREF
(
handle
);
Py_DECREF
(
arglist
);
Py_DECREF
(
arglist
);
...
...
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