perf header: Fix double fclose() on do_write(fd, xxx) failure
cppcheck reported: [util/header.c:983]: (error) Used file that is not opened. Thanks to Arnaldo Carvalho de Melo for pointing out that fclose(NULL) is undefined behavior -> protect against it. Signed-off-by: NThomas Jarosch <thomas.jarosch@intra2net.com> Link: http://lkml.kernel.org/r/1751778.SZQB4fNdIh@stormSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
Showing
想要评论请 注册 或 登录