]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
quota: fs_quota_mountpoint_get() - Fix crash due to initialized event
authorMarco Bettini <marco.bettini@open-xchange.com>
Tue, 25 Mar 2025 10:18:56 +0000 (10:18 +0000)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 26 Mar 2025 20:11:02 +0000 (20:11 +0000)
src/plugins/quota/quota-fs.c

index 040acdc0e2ff49ca86edb8122dc53e2a33be7df2..1150931ccf5fa4e9e1a494413ccbf92bbed404b7 100644 (file)
@@ -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) {