From ff24f14c0971f1fcbbb061bbedbd384874ed3957 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 16 Dec 2020 17:00:39 +0100 Subject: Fix potential null dereference --- src/state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/state.c b/src/state.c index a1c5d3c..914ff5b 100644 --- a/src/state.c +++ b/src/state.c @@ -1301,7 +1301,9 @@ lilv_state_delete(LilvWorld* world, // Remove state file const uint8_t* uri = sord_node_get_string(file); char* path = (char*)serd_file_uri_parse(uri, NULL); - try_unlink(state->dir, path); + if (path) { + try_unlink(state->dir, path); + } serd_free(path); } -- cgit v1.2.1