linux-btrace.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btt: fix missing cleanup call
@ 2008-02-13  7:48 Aaron Carroll
  2008-02-13 16:50 ` Alan D. Brunelle
  0 siblings, 1 reply; 2+ messages in thread
From: Aaron Carroll @ 2008-02-13  7:48 UTC (permalink / raw)
  To: linux-btrace

clean_args() exists but is never called, thus any files opened in args remain
open while the buffers backing those files are closed.

Signed-off-by: Aaron Carroll <aaronc@gelato.unsw.edu.au>
---
 btt/bt_timeline.c |    1 +
 btt/globals.h     |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/btt/bt_timeline.c b/btt/bt_timeline.c
index 981b909..17a1b23 100644
--- a/btt/bt_timeline.c
+++ b/btt/bt_timeline.c
@@ -92,6 +92,7 @@ int main(int argc, char *argv[])
 	free(input_name);
 	if (output_name) free(output_name);
 
+	clean_args();
 	clean_bufs();
 
 	return 0;
diff --git a/btt/globals.h b/btt/globals.h
index f6041de..486a3fc 100644
--- a/btt/globals.h
+++ b/btt/globals.h
@@ -228,6 +228,7 @@ extern struct list_head cios;
 
 /* args.c */
 void handle_args(int argc, char *argv[]);
+void clean_args();
 
 /* devmap.c */
 int dev_map_read(char *fname);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btt: fix missing cleanup call
  2008-02-13  7:48 [PATCH] btt: fix missing cleanup call Aaron Carroll
@ 2008-02-13 16:50 ` Alan D. Brunelle
  0 siblings, 0 replies; 2+ messages in thread
From: Alan D. Brunelle @ 2008-02-13 16:50 UTC (permalink / raw)
  To: linux-btrace

Aaron Carroll wrote:
> clean_args() exists but is never called, thus any files opened in args remain
> open while the buffers backing those files are closed.
> 
> Signed-off-by: Aaron Carroll <aaronc@gelato.unsw.edu.au>
> ---
>  btt/bt_timeline.c |    1 +
>  btt/globals.h     |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/btt/bt_timeline.c b/btt/bt_timeline.c
> index 981b909..17a1b23 100644
> --- a/btt/bt_timeline.c
> +++ b/btt/bt_timeline.c
> @@ -92,6 +92,7 @@ int main(int argc, char *argv[])
>  	free(input_name);
>  	if (output_name) free(output_name);
>  
> +	clean_args();
>  	clean_bufs();
>  
>  	return 0;
> diff --git a/btt/globals.h b/btt/globals.h
> index f6041de..486a3fc 100644
> --- a/btt/globals.h
> +++ b/btt/globals.h
> @@ -228,6 +228,7 @@ extern struct list_head cios;
>  
>  /* args.c */
>  void handle_args(int argc, char *argv[]);
> +void clean_args();
>  
>  /* devmap.c */
>  int dev_map_read(char *fname);
> 

Looks good, applied, thanks!

Alan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-13 16:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13  7:48 [PATCH] btt: fix missing cleanup call Aaron Carroll
2008-02-13 16:50 ` Alan D. Brunelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).