summaryrefslogtreecommitdiff
path: root/restart.c
diff options
context:
space:
mode:
Diffstat (limited to 'restart.c')
-rw-r--r--restart.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/restart.c b/restart.c
index 74faf75..1ce6799 100644
--- a/restart.c
+++ b/restart.c
@@ -82,6 +82,7 @@ static int restart_check(const char *file) {
restart_cb_ctx ctx;
ctx.f = f;
+ ctx.cb = NULL;
ctx.line = NULL;
ctx.done = false;
if (restart_get_kv(&ctx, NULL, NULL) != RESTART_DONE) {
@@ -91,6 +92,10 @@ static int restart_check(const char *file) {
// TODO: this should probably just return -1 and skip the reuse.
abort();
}
+ if (ctx.cb == NULL) {
+ fprintf(stderr, "[restart] Failed to read a tag from metadata file\n");
+ abort();
+ }
// loop call the callback, check result code.
bool failed = false;