summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/bootchooser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/bootchooser.c b/common/bootchooser.c
index 455f290..69d980d 100644
--- a/common/bootchooser.c
+++ b/common/bootchooser.c
@@ -376,9 +376,9 @@ struct bootchooser *bootchooser_get(void)
bc->state_prefix = xstrdup(state_prefix);
bc->state = state_by_name(state_devname);
if (!bc->state) {
- free(state_devname);
pr_err("Cannot get state '%s'\n",
state_devname);
+ free(state_devname);
ret = -ENODEV;
goto err;
}