summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/src/glfs-fops.c7
-rw-r--r--api/src/glfs-handleops.c1
-rw-r--r--api/src/glfs-mgmt.c3
3 files changed, 9 insertions, 2 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index 1bb958fc1b7..e8d4f9af18f 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -4664,6 +4664,11 @@ pub_glfs_xreaddirplus_r (struct glfs_fd *glfd, uint32_t flags,
/* reached EOD, ret = 0 */
ret = 0;
*res = NULL;
+ *xstat_p = NULL;
+
+ /* free xstat as applications shall not be using it */
+ glfs_free (xstat);
+
goto out;
}
@@ -4699,11 +4704,11 @@ pub_glfs_xreaddirplus_r (struct glfs_fd *glfd, uint32_t flags,
ret = xstat->flags_handled;
*xstat_p = xstat;
-out:
gf_msg_debug (THIS->name, 0,
"xreaddirp- requested_flags (%x) , processed_flags (%x)",
flags, xstat->flags_handled);
+out:
GF_REF_PUT (glfd);
if (ret < 0) {
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c
index de0a6deb87f..dbffa9e26bf 100644
--- a/api/src/glfs-handleops.c
+++ b/api/src/glfs-handleops.c
@@ -2089,6 +2089,7 @@ pub_glfs_h_poll_upcall (struct glfs *fs, struct glfs_upcall **up_arg)
case GF_UPCALL_RECALL_LEASE:
gf_log ("glfs_h_poll_upcall", GF_LOG_DEBUG,
"UPCALL_RECALL_LEASE is not implemented yet");
+ /* fallthrough till we support leases */
case GF_UPCALL_EVENT_NULL:
/* no 'default:' label, to force handling all upcall events */
errno = ENOENT;
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c
index 1726dac6ce4..bb4e77a1467 100644
--- a/api/src/glfs-mgmt.c
+++ b/api/src/glfs-mgmt.c
@@ -984,7 +984,8 @@ glfs_mgmt_init (struct glfs *fs)
host = "localhost";
}
- if (!strcmp (cmd_args->volfile_server_transport, "unix")) {
+ if (cmd_args->volfile_server_transport &&
+ !strcmp (cmd_args->volfile_server_transport, "unix")) {
ret = rpc_transport_unix_options_build (&options, host, 0);
} else {
ret = rpc_transport_inet_options_build (&options, host, port);