summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-21 04:50:20 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-22 13:06:31 +0530
commit27e1c9fbd3fb6eda4f7d64ff04dad9d306c237e7 (patch)
treeb1675e53505f0dc006cca1f31e9fb57b5db444de
parent31643eb227a5dfba11d23068e9626bf9546283bd (diff)
call-stub: Check for NULL in the correct variable
It looks like the argument fd was meant to be checked here instead of the fd in the call stub. This fixes a NULL fd bug that results in an EINVAL on opendir. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
-rw-r--r--libglusterfs/src/call-stub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c
index 439fd571148..63fe5be558f 100644
--- a/libglusterfs/src/call-stub.c
+++ b/libglusterfs/src/call-stub.c
@@ -1261,7 +1261,7 @@ fop_opendir_stub (call_frame_t *frame,
stub->args.opendir.fn = fn;
loc_copy (&stub->args.opendir.loc, loc);
- if (stub->args.opendir.fd)
+ if (fd)
stub->args.opendir.fd = fd_ref (fd);
out:
return stub;