I have it running but have some library code that uses fopen quite a bit and get memory leaks from those functions.
Example code :-
Code: Select all
char* filename = "w:\\test.txt";
char* mode = "r";
FILE* fd = fopen(filename, mode);
if (fd != NULL) {
fclose(fd);
}
Also fstat line causes memory leak when that is added :-
Code: Select all
char* filename = "w:\\test.txt";
char* mode = "r";
FILE* fd = fopen(filename, mode);
if (fd != NULL) {
struct stat statbuf;
int handle = fileno(fd);
fstat(handle, &statbuf);
fclose(fd);
}