From 817331991ce86fc7c6f4a753efd0f580b3f86456 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 5 Sep 2009 11:50:09 +0000 Subject: [PATCH] Closed a small memory leak with drive inquiry --- libburn/trunk/cdrskin/cdrskin.c | 8 ++++++-- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin.c b/libburn/trunk/cdrskin/cdrskin.c index b89f39de..3bd0e2d5 100644 --- a/libburn/trunk/cdrskin/cdrskin.c +++ b/libburn/trunk/cdrskin/cdrskin.c @@ -3647,10 +3647,14 @@ int Cdrskin_determine_media_caps(struct CdrskiN *skin, int flag) skin->media_is_overwriteable= skin->media_does_multi= 0; ret= burn_disc_get_multi_caps(skin->grabbed_drive,BURN_WRITE_NONE,&caps,0); if(ret<=0) - return(0); + goto ex; skin->media_is_overwriteable= !!caps->start_adr; skin->media_does_multi= !!caps->multi_session; - return(1); + ret= 1; +ex:; + if(caps != NULL) + burn_disc_free_multi_caps(&caps); + return(ret); #else /* Cdrskin_libburn_has_get_multi_capS */ return(-1); #endif diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index 2b6f13e2..939c0230 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2009.09.05.114326" +#define Cdrskin_timestamP "2009.09.05.115112"