Closed memory leak with minor cdrskin jobs. Found by valgrind.

This commit is contained in:
Thomas Schmitt 2015-10-28 16:20:15 +00:00
parent 232b49bc90
commit 189a43bac9
2 changed files with 5 additions and 1 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2015.10.28.153929" #define Cdrskin_timestamP "2015.10.28.162205"

View File

@ -118,6 +118,10 @@ void burn_drive_free_subs(struct burn_drive *d)
close (d->stdio_fd); close (d->stdio_fd);
d->stdio_fd = -1; d->stdio_fd = -1;
burn_feature_descr_free(&(d->features), 0); 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); sg_dispose_drive(d, 0);
} }