1.1 --- a/libfsclient/lib/src/notifier.cc Fri Jul 09 00:15:29 2021 +0200
1.2 +++ b/libfsclient/lib/src/notifier.cc Fri Jul 09 23:52:49 2021 +0200
1.3 @@ -85,11 +85,15 @@
1.4 if (l4_is_invalid_cap(file->notifier))
1.5 return -L4_EINVAL;
1.6
1.7 - ipc_cap_free_um(file->notifier);
1.8 -
1.9 client_Notification notify(file->ref);
1.10
1.11 - return notify.unsubscribe();
1.12 + long err = notify.unsubscribe(file->notifier);
1.13 +
1.14 + if (err)
1.15 + return err;
1.16 +
1.17 + ipc_cap_free_um(file->notifier);
1.18 + return L4_EOK;
1.19 }
1.20
1.21 /* Handle a notification event for a file. Ideally, this would be invoked by the