[libgit2-glib] branch-enumerator: fix missing struct field init
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] branch-enumerator: fix missing struct field init
- Date: Mon, 28 Jan 2019 23:16:24 +0000 (UTC)
commit 75e405a41f5b4954bc253168acbf12b8b4136871
Author: Christian Hergert <chergert redhat com>
Date: Mon Jan 28 14:52:38 2019 -0800
branch-enumerator: fix missing struct field init
This needs to be set to NULL so that it is not accidentially freed during
a call to ggit_branch_enumerator_next().
libgit2-glib/ggit-branch-enumerator.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/libgit2-glib/ggit-branch-enumerator.c b/libgit2-glib/ggit-branch-enumerator.c
index b127f53..9607278 100644
--- a/libgit2-glib/ggit-branch-enumerator.c
+++ b/libgit2-glib/ggit-branch-enumerator.c
@@ -19,6 +19,7 @@ _ggit_branch_enumerator_wrap (git_branch_iterator *iter)
ret = g_slice_new (GgitBranchEnumerator);
ret->ref_count = 1;
ret->iterator = iter;
+ ret->ref = NULL;
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]