Closed dcb314 closed 8 years ago
While you're technically correct, look at how the code is actually called.
Line 350 (https://github.com/hawson/monitor-core/blob/master/gmond/g25_config.c#L350) is part of the print_ganglia_25_config()
function, which returns 0 after successfully converting an old version 2.5 configuration file, or 1 if there was an error.
The funcition is called once, from gmond.c:
3305: exit (print_ganglia_25_config( args_info.convert_arg ));
So yes, there's a leak, right before the program exits.
That said, I'm not even sure that fp
is actually used for anything in that function...
$ egrep "fopen|fclose" ../BUILD/ganglia-3.7.2/gmond/g25_config.c fp = fopen( path, "r"); $
Suggest add call to missing fclose.