From: Olaf Hering Date: Wed, 31 May 2023 16:06:58 +0000 (+0100) Subject: xentrace: close output file in the function which opened it X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=dc98fa74446e5abe417e5ba9a6a632b50444cfa1;p=people%2Faperard%2Fxen-unstable.git xentrace: close output file in the function which opened it Signed-off-by: Olaf Hering Reviewed-by: George Dunlap --- diff --git a/tools/xentrace/xentrace.c b/tools/xentrace/xentrace.c index a073cab26d..3548255123 100644 --- a/tools/xentrace/xentrace.c +++ b/tools/xentrace/xentrace.c @@ -794,7 +794,6 @@ static void monitor_tbufs(void) free(meta); free(data); /* don't need to munmap - cleanup is automatic */ - close(outfd); } @@ -1225,6 +1224,7 @@ int main(int argc, char **argv) monitor_tbufs(); + close(outfd); return 0; }