summaryrefslogtreecommitdiffstats
path: root/api/src
diff options
context:
space:
mode:
Diffstat (limited to 'api/src')
-rw-r--r--api/src/glfs-fops.c4
-rw-r--r--api/src/glfs-handleops.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index 77c8d24c63e..2ff1c8cc89d 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -4274,8 +4274,10 @@ priv_glfs_process_upcall_event (struct glfs *fs, void *data)
ret = 0;
out:
- if (ret && u_list)
+ if (ret && u_list) {
+ GF_FREE (u_list->upcall_data.data);
GF_FREE(u_list);
+ }
return;
}
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c
index 1c5546ec427..0ee7e7d37b7 100644
--- a/api/src/glfs-handleops.c
+++ b/api/src/glfs-handleops.c
@@ -2033,6 +2033,7 @@ pub_glfs_h_poll_upcall (struct glfs *fs, struct callback_arg *up_arg)
&fs->upcall_list,
upcall_list) {
found = 1;
+ list_del_init (&u_list->upcall_list);
break;
}
}
@@ -2069,7 +2070,6 @@ pub_glfs_h_poll_upcall (struct glfs *fs, struct callback_arg *up_arg)
up_arg->reason = reason;
- list_del_init (&u_list->upcall_list);
GF_FREE (u_list->upcall_data.data);
GF_FREE (u_list);
}