From 877c6e7e8d3839f9dccb35b475d965a6c1927ad2 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 28 Oct 2015 16:20:15 +0000 Subject: [PATCH] Closed memory leak with minor cdrskin jobs. Found by valgrind. --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/drive.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index a7e57a68..3fbdd4a2 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2015.10.28.153929" +#define Cdrskin_timestamP "2015.10.28.162205" diff --git a/libburn/trunk/libburn/drive.c b/libburn/trunk/libburn/drive.c index fbe72343..ae591629 100644 --- a/libburn/trunk/libburn/drive.c +++ b/libburn/trunk/libburn/drive.c @@ -118,6 +118,10 @@ void burn_drive_free_subs(struct burn_drive *d) close (d->stdio_fd); d->stdio_fd = -1; burn_feature_descr_free(&(d->features), 0); + BURN_FREE_MEM(d->drive_serial_number); + BURN_FREE_MEM(d->media_serial_number); + d->drive_serial_number = d->media_serial_number = NULL; + d->drive_serial_number_len = d->media_serial_number_len = 0; sg_dispose_drive(d, 0); }