Add a missing incref. This fixes a potential segfault at teardown, when the class registry is being emptied.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/59a35a42 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/59a35a42 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/59a35a42 Branch: refs/heads/go_bindings_1 Commit: 59a35a42c099fa5c8d409972496580d1ec75d499 Parents: f784b1a Author: Marvin Humphrey <[email protected]> Authored: Tue Nov 11 15:08:42 2014 -0800 Committer: Marvin Humphrey <[email protected]> Committed: Tue Nov 11 15:12:39 2014 -0800 ---------------------------------------------------------------------- compiler/src/CFCMethod.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/59a35a42/compiler/src/CFCMethod.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCMethod.c b/compiler/src/CFCMethod.c index 2a1bba1..ee5cb29 100644 --- a/compiler/src/CFCMethod.c +++ b/compiler/src/CFCMethod.c @@ -255,7 +255,8 @@ CFCMethod_finalize(CFCMethod *self) { self->function.param_list, self->function.docucomment, true, self->is_abstract); - finalized->novel_method = self->novel_method; + finalized->novel_method + = (CFCMethod*)CFCBase_incref((CFCBase*)self->novel_method); finalized->is_novel = self->is_novel; return finalized; }
