diff -ru psmisc-22.21/src/pstree.c psmisc-22.21-new/src/pstree.c
--- psmisc-22.21/src/pstree.c	2014-02-01 21:59:07.000000000 -0800
+++ psmisc-22.21-new/src/pstree.c	2016-04-28 16:09:30.528897670 -0700
@@ -816,10 +816,10 @@
 		return threadname;
 	    }
 	}
+        fclose(file);
     }
     /* Fall back to old method */
     sprintf(threadname, "{%.*s}", COMM_LEN, comm);
-    fclose(file);
     return threadname;
 }