From: Marco Bettini Date: Tue, 25 Mar 2025 10:18:56 +0000 (+0000) Subject: quota: fs_quota_mountpoint_get() - Fix crash due to initialized event X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c50822a5c68a9b9d4eef21a0ef68a904a9a25dd2;p=thirdparty%2Fdovecot%2Fcore.git quota: fs_quota_mountpoint_get() - Fix crash due to initialized event --- diff --git a/src/plugins/quota/quota-fs.c b/src/plugins/quota/quota-fs.c index 040acdc0e2..1150931ccf 100644 --- a/src/plugins/quota/quota-fs.c +++ b/src/plugins/quota/quota-fs.c @@ -189,7 +189,7 @@ static void fs_quota_deinit(struct quota_root *_root) i_free(root); } -static struct fs_quota_mountpoint *fs_quota_mountpoint_get(const char *dir) +static struct fs_quota_mountpoint *fs_quota_mountpoint_get(const char *dir, struct event *event) { struct fs_quota_mountpoint *mount; struct mountpoint point; @@ -220,8 +220,7 @@ static struct fs_quota_mountpoint *fs_quota_mountpoint_get(const char *dir) if (mount_type_is_nfs(mount)) { if (strchr(mount->device_path, ':') == NULL) { - e_error(quota_backend_fs.event, - "%s is not a valid NFS device path", + e_error(event, "%s is not a valid NFS device path", mount->device_path); fs_quota_mountpoint_free(mount); return NULL; @@ -233,7 +232,8 @@ static struct fs_quota_mountpoint *fs_quota_mountpoint_get(const char *dir) static void fs_quota_mount_init(struct fs_quota_root *root, const char *dir) { - struct fs_quota_mountpoint *mount = fs_quota_mountpoint_get(dir); + struct event *event = root->root.quota->event; + struct fs_quota_mountpoint *mount = fs_quota_mountpoint_get(dir, event); if (mount == NULL) return; if (mount->initialized) {