This patch prevents a segfault caused by spc_open and spc_clunk if the
filesystem was previously disconnected by spc_disconnect_fsys .
Signed-off-by: Hugh Greenberg <[EMAIL PROTECTED]>
Index: open.c
===================================================================
--- open.c (revision 695)
+++ open.c (working copy)
@@ -99,6 +99,9 @@
Spfcall *tc, *rc;
Spcfid *fid;
+ if (fs->fd < 0)
+ return NULL;
+
fid = spc_walk(fs, path);
if (!fid)
return NULL;
@@ -128,6 +131,9 @@
Spcfsys *fs;
fs = fid->fsys;
+ if (fs->fd < 0)
+ return -1;
+
tc = sp_create_tclunk(fid->fid);
if (spc_rpc(fid->fsys, tc, &rc) < 0) {
free(tc);