[ostree] status: Don't crash if we deployed a local refspec



commit 6d84321a16ec581269bee947bb6f6fceacc2f0c4
Author: Colin Walters <walters verbum org>
Date:   Mon Apr 20 21:02:25 2015 -0400

    status: Don't crash if we deployed a local refspec
    
    In the case we built a local tree, we'd pass `NULL` as a remote down
    to the GPG checking code.  Noticed this in the test suite.

 src/ostree/ot-admin-builtin-status.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/ostree/ot-admin-builtin-status.c b/src/ostree/ot-admin-builtin-status.c
index c6597ab..802aaa8 100644
--- a/src/ostree/ot-admin-builtin-status.c
+++ b/src/ostree/ot-admin-builtin-status.c
@@ -74,7 +74,8 @@ deployment_get_gpg_verify (OstreeDeployment *deployment,
   if (!ostree_parse_refspec (refspec, &remote, NULL, NULL))
     goto out;
 
-  (void) ostree_repo_remote_get_gpg_verify (repo, remote, &gpg_verify, NULL);
+  if (remote)
+    (void) ostree_repo_remote_get_gpg_verify (repo, remote, &gpg_verify, NULL);
 
 out:
   return gpg_verify;


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