add back fd close
@@ -21,6 +21,7 @@ int osGetNumThreads(pid_t pid)
}
if (g_fn.read(fd, buf, sizeof(buf)) == -1) {
+ g_fn.close(fd);
return -1;
}
@@ -28,6 +29,7 @@ int osGetNumThreads(pid_t pid)
for (i = 1; i < 20; i++) {
entry = strtok_r(NULL, delim, &last);
}
+ g_fn.close(fd);
if ((result = strtol(entry, NULL, 0)) == (long)0) {
return -1;
