cpupower: bench: parse.c: fix several resource leaks
authorColin Ian King <colin.king@canonical.com>
Thu, 28 Apr 2016 13:24:37 +0000 (15:24 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 28 Apr 2016 14:02:28 +0000 (16:02 +0200)
commit983d9e065b37dac5aaa2d5a819bdd5b5a0b78c8c
tree77545e6fe46603334d6c6585ae00532f024e6872
parent04b03594c73c1877a98c7a657cc45bf5e9d89f7c
cpupower: bench: parse.c: fix several resource leaks

The error handling in prepare_output has several issues with
resource leaks.  Ensure that filename is free'd and the directory
stream DIR is closed before returning.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Thomas Renninger <trenn@suse.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
tools/power/cpupower/bench/parse.c