diff --git a/changelog.md b/changelog.md index f7af51b..cc9a9dd 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,7 @@ ### Fixes * Fix meson build failure when gtest or jansson are not installed +* Fix crash if libfuse is not available at runtime ## 0.3.0 _(Fri Jun 05 2020)_ diff --git a/lib/webfuse/adapter/impl/session.c b/lib/webfuse/adapter/impl/session.c index 6bacd10..159f43a 100644 --- a/lib/webfuse/adapter/impl/session.c +++ b/lib/webfuse/adapter/impl/session.c @@ -109,8 +109,11 @@ bool wf_impl_session_add_filesystem( if (result) { struct wf_impl_filesystem * filesystem = wf_impl_filesystem_create(session, name, mountpoint); - wf_slist_append(&session->filesystems, &filesystem->item); result = (NULL != filesystem); + if (result) + { + wf_slist_append(&session->filesystems, &filesystem->item); + } } // cleanup on error