dmxVDLRead: if we opened a file, close it instead of leaking it

Reported with other leaks found by cppcheck in bugzilla #50281
https://bugs.freedesktop.org/show_bug.cgi?id=50281

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Alan Coopersmith 2013-02-10 10:18:02 -08:00
parent 8c5ff2e93f
commit 6bca0184d1

View File

@ -228,5 +228,9 @@ dmxVDLRead(const char *filename)
break;
}
}
if (str != stdin)
fclose(str);
return entry;
}