Skip to content

Commit

Permalink
More DECREF.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearsandwich committed Aug 24, 2018
1 parent e5a1017 commit b5fd549
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rclpy/src/rclpy/_rclpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -3486,17 +3486,22 @@ static PyObject * _parameter_from_rcl_variant(

PyObject * args = Py_BuildValue("(i)", type_enum_value);
if (NULL == args) {
Py_DECREF(value);
return NULL;
}
PyObject * type = PyObject_CallObject(parameter_type_cls, args);
Py_DECREF(args);
args = Py_BuildValue("OOO", name, type, value);
if (NULL == args) {
Py_DECREF(type);
Py_DECREF(value);
return NULL;
}
Py_DECREF(value);
Py_DECREF(type);

PyObject * param = PyObject_CallObject(parameter_cls, args);
Py_DECREF(args);
Py_DECREF(type);
return param;
}

Expand Down

0 comments on commit b5fd549

Please sign in to comment.