[ostree/easy-fixes: 2/4] ostree-pull: get the branches from config



commit 64071456ea9b104e213b29c93e69095540eca18c
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat May 5 17:53:18 2012 -0400

    ostree-pull: get the branches from config
    
    "ostree-pull --repo=repo gnome" was segfaulting here, because
    key is never initialized. The correct string to pass as the group
    name there is 'remote "gnome"', which is already available in
    tmpstr.

 src/ostree/ostree-pull.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/ostree/ostree-pull.c b/src/ostree/ostree-pull.c
index 75c06bb..98f6f5f 100644
--- a/src/ostree/ostree-pull.c
+++ b/src/ostree/ostree-pull.c
@@ -1160,7 +1160,7 @@ ostree_builtin_pull (int argc, char **argv, GFile *repo_path, GError **error)
       GError *temp_error = NULL;
       gboolean fetch_all_refs;
 
-      configured_branches = g_key_file_get_string_list (config, key, "branches", NULL, &temp_error);
+      configured_branches = g_key_file_get_string_list (config, tmpstr, "branches", NULL, &temp_error);
       if (configured_branches == NULL && temp_error != NULL)
         {
           if (g_error_matches (temp_error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]