From 27e1c9fbd3fb6eda4f7d64ff04dad9d306c237e7 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Tue, 21 Apr 2009 04:50:20 -0700 Subject: 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 --- libglusterfs/src/call-stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs/src/call-stub.c') diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c index 439fd5711..63fe5be55 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; -- cgit