fix memory leak of commitinfo - stagit-gopher - A git gopher frontend. (mirror)
 (HTM) git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit ae6461dc6f6ddc1d4bb33eef9cee71d4e7599458
 (DIR) parent 543107cc36306a3539d21a8441e75276310a45db
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Sun, 12 Mar 2017 21:24:07 +0100
       
       fix memory leak of commitinfo
       
       Diffstat:
         M stagit.c                            |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
 (DIR) diff --git a/stagit.c b/stagit.c
       @@ -178,6 +178,7 @@ commitinfo_free(struct commitinfo *ci)
                git_tree_free(ci->parent_tree);
                git_commit_free(ci->commit);
                git_commit_free(ci->parent);
       +        free(ci);
        }
        
        struct commitinfo *
       @@ -221,7 +222,6 @@ commitinfo_getbyoid(const git_oid *id)
        
        err:
                commitinfo_free(ci);
       -        free(ci);
        
                return NULL;
        }