Bug fix: Closed memory leak with failure to open device file under FreeBSD. Thanks to George Danchev.

This commit is contained in:
Thomas Schmitt 2009-10-27 10:09:31 +00:00
parent cca24711b8
commit 937a226543
2 changed files with 3 additions and 1 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2009.10.27.100637" #define Cdrskin_timestamP "2009.10.27.101031"

View File

@ -72,6 +72,8 @@ static int sg_init_enumerator(burn_drive_enumerator_t *idx_)
if ((idx->fd = open(XPT_DEVICE, O_RDWR)) == -1) { if ((idx->fd = open(XPT_DEVICE, O_RDWR)) == -1) {
warn("couldn't open %s", XPT_DEVICE); warn("couldn't open %s", XPT_DEVICE);
free(idx);
idx = NULL;
return -1; return -1;
} }