please see attached patch - hope it's good now cheers, Marcos
2015-04-21 3:29 GMT-03:00 Dirk Hohndel <[email protected]>: > This patch is whitespace damaged (but otherwise good). Would you please > resend in a way that keeps the whitespace intact? > > Thanks > > /D > > On Mon, Apr 20, 2015 at 01:15:10PM -0300, Marcos Cardinot wrote: > > From 978e2f3281dbd846c61980c00732b1d1bdea932c Mon Sep 17 00:00:00 2001 > > From: Marcos CARDINOT <[email protected]> > > Date: Mon, 20 Apr 2015 13:05:14 -0300 > > Subject: [PATCH] ostctools - resource leaks > > > > some resources are not being freed. > > > > Signed-off-by: Marcos CARDINOT <[email protected]> > > --- > > ostctools.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/ostctools.c b/ostctools.c > > index 4fa0ba5..68b7da0 100644 > > --- a/ostctools.c > > +++ b/ostctools.c > > @@ -78,6 +78,9 @@ void ostctools_import(const char *file, struct > dive_table > > *divetable) > > // Open the archive > > if ((archive = subsurface_fopen(file, "rb")) == NULL) { > > report_error(translate("gettextFromC", "Error: couldn't open the > file")); > > + free(devdata); > > + free(buffer); > > + free(ostcdive); > > return; > > } > > > > -- > > > _______________________________________________ > > subsurface mailing list > > [email protected] > > http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface > >
From eeed5973275c4ea278f5a5ad16365cba19ba7cf7 Mon Sep 17 00:00:00 2001 From: Marcos CARDINOT <[email protected]> Date: Tue, 21 Apr 2015 14:00:17 -0300 Subject: [PATCH] ostctools - resource leaks some resources are not being freed. Signed-off-by: Marcos CARDINOT <[email protected]> --- ostctools.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ostctools.c b/ostctools.c index 4fa0ba5..68b7da0 100644 --- a/ostctools.c +++ b/ostctools.c @@ -78,6 +78,9 @@ void ostctools_import(const char *file, struct dive_table *divetable) // Open the archive if ((archive = subsurface_fopen(file, "rb")) == NULL) { report_error(translate("gettextFromC", "Error: couldn't open the file")); + free(devdata); + free(buffer); + free(ostcdive); return; } -- 1.9.1
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
