valgrind « fopen « C File Q&A

Home
C File Q&A
1.array
2.binary
3.delete
4.Development
5.directory
6.fgets
7.fopen
8.fprintf
9.fscanf
10.fwrite
11.header
12.include
13.input
14.LINE
15.linux
16.open
17.output
18.pointer
19.read
20.size
21.string
22.struct
23.Text
24.windows
25.write
C File Q&A » fopen » valgrind 

1. leak detected using valgrind when using fopen    stackoverflow.com

gcc 4.4.4 c89 valgrind 3.5.0. I am getting a leak detected when I open file using a file pointer.

==17681==    in use at exit: 352 bytes in 1 blocks
==17681== ...

2. Memory Leak in C with fopen    stackoverflow.com

I have a simple piece of a program thats currently producing some memory leaks according to valgrind and I'm not sure why:

char *filename = strrchr(argv[3], "/") + 1;
file = fopen(fileName, "w");
So ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.