[geany/geany-plugins] 5ca771: git-changebar: Handle Git buffer allocation failure

Colomban Wendling git-noreply at xxxxx
Sun May 31 18:18:57 UTC 2015


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sun, 31 May 2015 18:18:57 UTC
Commit:      5ca771733082b2d6fec570dd8d0f1b91f741b756
             https://github.com/geany/geany-plugins/commit/5ca771733082b2d6fec570dd8d0f1b91f741b756

Log Message:
-----------
git-changebar: Handle Git buffer allocation failure


Modified Paths:
--------------
    git-changebar/src/gcb-plugin.c

Modified: git-changebar/src/gcb-plugin.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -222,8 +222,8 @@ repo_get_file_blob_contents (git_repository  *repo,
           
           if (git_blob_lookup (&blob, repo, git_tree_entry_id (entry)) == 0) {
             if (git_blob_filtered_content (contents, blob, relpath,
-                                           check_for_binary_data) == 0) {
-              git_buf_grow (contents, 0);
+                                           check_for_binary_data) == 0 &&
+                git_buf_grow (contents, 0) == 0) {
               success = TRUE;
             }
             git_blob_free (blob);



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list