diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-02-10 10:18:02 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-04-24 14:22:36 -0700 |
commit | 6bca0184d167388cd417d113031317990489987d (patch) | |
tree | 8a63c1e06a9f11b4f88672d4c21c68d1d3e8de9c /hw/dmx | |
parent | 8c5ff2e93f73b24adff741b25fc1e31b2f5dd0ac (diff) |
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>
Diffstat (limited to 'hw/dmx')
-rw-r--r-- | hw/dmx/config/dmxcompat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/dmx/config/dmxcompat.c b/hw/dmx/config/dmxcompat.c index bd9f12738..107991a96 100644 --- a/hw/dmx/config/dmxcompat.c +++ b/hw/dmx/config/dmxcompat.c @@ -228,5 +228,9 @@ dmxVDLRead(const char *filename) break; } } + + if (str != stdin) + fclose(str); + return entry; } |