From 57e4c53633a742635fda17d3ee7bfca22eb05151 Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Fri, 19 Apr 2013 07:51:56 +0800 Subject: [PATCH] Fix dereferencing null pointer in git_close_log Signed-off-by: Sup Yut Sum --- ext/gitdll/gitdll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/gitdll/gitdll.c b/ext/gitdll/gitdll.c index 3aa8e9c08..588ef2307 100644 --- a/ext/gitdll/gitdll.c +++ b/ext/gitdll/gitdll.c @@ -441,7 +441,8 @@ int git_close_log(GIT_LOG handle) } free_all_pack(); - free_notes(*display_notes_trees); + if (display_notes_trees) + free_notes(*display_notes_trees); display_notes_trees = 0; return 0; } -- 2.11.4.GIT