Fix dereferencing null pointer in git_close_log
authorSup Yut Sum <ch3cooli@gmail.com>
Thu, 18 Apr 2013 23:51:56 +0000 (19 07:51 +0800)
committerSup Yut Sum <ch3cooli@gmail.com>
Thu, 18 Apr 2013 23:51:56 +0000 (19 07:51 +0800)
Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
ext/gitdll/gitdll.c

index 3aa8e9c..588ef23 100644 (file)
@@ -441,7 +441,8 @@ int git_close_log(GIT_LOG handle)
        }\r
        free_all_pack();\r
 \r
-       free_notes(*display_notes_trees);\r
+       if (display_notes_trees)\r
+               free_notes(*display_notes_trees);\r
        display_notes_trees = 0;\r
        return 0;\r
 }\r