Skip to content

Commit

Permalink
fix decref in error cases - second time
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
  • Loading branch information
dirk-thomas committed May 2, 2019
1 parent 0dc4956 commit bf1b814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rosidl_generator_py/resource/_msg_support.c.em
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ nested_type = '__'.join(type_.namespaced_name())
char * buffer;
Py_ssize_t length;
int rc = PyBytes_AsStringAndSize(encoded_field, &buffer, &length);
Py_DECREF(encoded_field);
if (rc) {
Py_DECREF(field);
return false;
Expand All @@ -426,7 +427,6 @@ nested_type = '__'.join(type_.namespaced_name())
Py_DECREF(field);
return false;
}
Py_DECREF(encoded_field);
@[ elif isinstance(member.type, BasicType) and member.type.typename == 'boolean']@
assert(PyBool_Check(field));
ros_message->@(member.name) = (Py_True == field);
Expand Down

0 comments on commit bf1b814

Please sign in to comment.