Commit [9de89a] uses fopen to find the tasks, but doesn't fclose
them afterward. Thanks for the anonymous and somewhat obscure
bug commenter for pointing it out.
Signed-off-by: Craig Small <csmall@enc.com.au>
* pstree.c - display process tree
*
* Copyright (C) 1993-2002 Werner Almesberger
- * Copyright (C) 2002-2012 Craig Small
+ * Copyright (C) 2002-2014 Craig Small
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
++thread_comm;
*endcomm = '\0';
sprintf(threadname, "{%.*s}", COMM_LEN, thread_comm);
+ (void) fclose(file);
return threadname;
}
}
}
/* Fall back to old method */
sprintf(threadname, "{%.*s}", COMM_LEN, comm);
+ fclose(file);
return threadname;
}