Prevented SIGSEGV after illegal drive operations during sync write

This commit is contained in:
2008-10-04 07:27:43 +00:00
parent 78642d08ae
commit 89c12404d0
4 changed files with 9 additions and 8 deletions

View File

@ -323,7 +323,7 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
int alignment = 2048, start, upto, chunksize = 1, err, cpy_size, i;
int sose_mem = 0, fd = -1, ret;
char msg[81], *wpt;
struct buffer buf;
struct buffer buf, *buffer_mem = d->buffer;
/*
#define Libburn_read_data_adr_logginG 1
@ -485,7 +485,7 @@ ex:;
if (fd != -1)
close(fd);
*/
d->buffer = NULL;
d->buffer = buffer_mem;
d->busy = BURN_DRIVE_IDLE;
return ret;
}