[ostree] Fix crash when deploying with implicit os name
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] Fix crash when deploying with implicit os name
- Date: Mon, 28 Oct 2013 13:37:40 +0000 (UTC)
commit 7ecfbff26e629509e3ae02867b43ee0ef4ed1018
Author: Daniel Narvaez <dwnarvaez gmail com>
Date: Sun Oct 27 19:39:02 2013 +0100
Fix crash when deploying with implicit os name
When booted into an ostree you can deploy without passing
an --os option. That was crashing though, because
ot_admin_complete_deploy_one is called with NULL
osname but it was not handling it properly.
https://bugzilla.gnome.org/show_bug.cgi?id=710970
src/ostree/ot-admin-functions.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/ostree/ot-admin-functions.c b/src/ostree/ot-admin-functions.c
index fe5c3f9..7c8a050 100644
--- a/src/ostree/ot-admin-functions.c
+++ b/src/ostree/ot-admin-functions.c
@@ -77,7 +77,8 @@ ot_admin_complete_deploy_one (OstreeSysroot *sysroot,
* booted and merge deployments
*/
if (opt_retain ||
- strcmp (ostree_deployment_get_osname (deployment), osname) != 0 ||
+ (osname != NULL &&
+ strcmp (ostree_deployment_get_osname (deployment), osname) != 0) ||
ostree_deployment_equal (deployment, booted_deployment) ||
ostree_deployment_equal (deployment, merge_deployment))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]