[Bug 756864] stats: memory leak when fgets() fails
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Oct 20 05:52:50 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=756864
--- Comment #1 from Luis de Bethencourt <luis at debethencourt.com> ---
For easy reviewing, this is the beginning of the function collect_stats().
static void
collect_stats (const gchar * filename)
{
FILE *log;
if ((log = fopen (filename, "rt"))) {
gchar line[5001];
/* probe format */
if (fgets (line, 5000, log)) {
[...]
The patch moves fclose(log) to be at the end of the true branch of if (fopen),
instead of the true branch of (fgets).
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list