Source code is while(!feof(map_file)) { fgets(buf, 1024, map_file); QString line = QString::fromLatin1(buf).trimmed(); const QStringList split = line.split(QLatin1Char(' '), QString::SkipEmptyParts); if (split.count() <= 1) return 1; Suggest add call to fclose.
I should also say that I found this bug by using cppcheck, a static analysis tool. I highly recommend it for C/C++ development work.
This one's a false positive, as the circumstances of this function call is that it's already running in main(). In other words as soon as we execute "return 1" we're stopping execution anyways and the OS will recover the file descriptor without an fclose() call. If it were almost any other type of function I'd probably commit a fix just to keep the static analysis tools happy but I can't bring myself to here for what is essentially a documentation change.
The kmtrace tool is no longer maintained. We suggest you use the 'heaptrack' tool instead. For more information, please see http://milianw.de/tag/heaptrack