Index: /trunk/Ohana/src/libohana/src/glockfile.c
===================================================================
--- /trunk/Ohana/src/libohana/src/glockfile.c	(revision 2820)
+++ /trunk/Ohana/src/libohana/src/glockfile.c	(revision 2821)
@@ -45,12 +45,16 @@
 }
 
+/* clears lock. removes hardlock even if file pointer is not supplied */
 int fclearlockfile (char *filename, FILE *f, int type, int *state) {
 
   int fd, status;
 
-  fflush (f);
-  fd = fileno (f);
+  fd = -1;
+  if (f != NULL) {
+    fflush (f);
+    fd = fileno (f);
+  }
   status = clearlockfile2 (filename, fd, type, state);
-  fclose (f);
+  if (f != NULL) fclose (f);
   return (status);
 }
