diff options
Diffstat (limited to 'drivers/scsi/gdth_proc.c')
-rw-r--r-- | drivers/scsi/gdth_proc.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c index 0572b9bf4bd..652754319a4 100644 --- a/drivers/scsi/gdth_proc.c +++ b/drivers/scsi/gdth_proc.c @@ -365,8 +365,10 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, len = 0; begin = pos; } - if (pos > offset + length) + if (pos > offset + length) { + gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); goto stop_output; + } } } gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); @@ -450,8 +452,10 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, len = 0; begin = pos; } - if (pos > offset + length) + if (pos > offset + length) { + gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); goto stop_output; + } } while (drv_no != -1); if (is_mirr) { @@ -472,8 +476,10 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, len = 0; begin = pos; } - if (pos > offset + length) + if (pos > offset + length) { + gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); goto stop_output; + } } gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); @@ -542,8 +548,10 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, len = 0; begin = pos; } - if (pos > offset + length) + if (pos > offset + length) { + gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); goto stop_output; + } } } gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); |