diff options
Diffstat (limited to 'lib/memdebug.c')
-rw-r--r-- | lib/memdebug.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/memdebug.c b/lib/memdebug.c index 1bd945e0d..a92207f64 100644 --- a/lib/memdebug.c +++ b/lib/memdebug.c @@ -151,4 +151,20 @@ int curl_sclose(int sockfd, int line, char *source) return sockfd; } +FILE *curl_fopen(char *file, char *mode, int line, char *source) +{ + FILE *res=(fopen)(file, mode); + fprintf(logfile?logfile:stderr, "FILE %s:%d fopen(\"%s\") = %p\n", + source, line, file, res); + return res; +} + +int curl_fclose(FILE *file, int line, char *source) +{ + int res=(fclose)(file); + fprintf(logfile?logfile:stderr, "FILE %s:%d fclose(%p)\n", + source, line, file); + return res; +} + #endif /* MALLOCDEBUG */ |