From e7a38a62d3005c4b859bcfb9af151304d5008cd2 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 27 Sep 2019 23:54:52 +0200 Subject: Fix null-pointer deref in sqfsdiff initialization error path If creating a dir reader fails, don't try to clean it up afterwards. Signed-off-by: David Oberhollenzer --- difftool/sqfsdiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'difftool') diff --git a/difftool/sqfsdiff.c b/difftool/sqfsdiff.c index b0d270a..4209c9a 100644 --- a/difftool/sqfsdiff.c +++ b/difftool/sqfsdiff.c @@ -60,7 +60,7 @@ static int open_sfqs(sqfs_state_t *state, const char *path) state->file); if (state->dr == NULL) { perror("creating directory reader"); - goto fail_dr; + goto fail_id; } if (sqfs_dir_reader_get_full_hierarchy(state->dr, state->idtbl, -- cgit v1.2.3