From 385449b1df593440abcf6636c81eb5ea19b1d1a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Wed, 4 Mar 2015 01:23:20 +0100 Subject: note: use a git_buf to return the default namespace The caller has otherwise no way to know how long the string will be allocated or ability to free it. This fixes #2944. --- include/git2/notes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/git2') diff --git a/include/git2/notes.h b/include/git2/notes.h index bb7c02dda..3a626cafd 100644 --- a/include/git2/notes.h +++ b/include/git2/notes.h @@ -183,12 +183,12 @@ GIT_EXTERN(void) git_note_free(git_note *note); /** * Get the default notes reference for a repository * - * @param out Pointer to the default notes reference + * @param out buffer in which to store the name of the default notes reference * @param repo The Git repository * * @return 0 or an error code */ -GIT_EXTERN(int) git_note_default_ref(const char **out, git_repository *repo); +GIT_EXTERN(int) git_note_default_ref(git_buf *out, git_repository *repo); /** * Loop over all the notes within a specified namespace -- cgit v1.2.1