diff options
Diffstat (limited to 'zaptel.c')
-rwxr-xr-x | zaptel.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2499,7 +2499,8 @@ static int zt_common_ioctl(struct inode *node, struct file *file, unsigned int c !memcmp(chans[i]->txgain, defgain, 256)) { /* This is really just a normal gain, so deallocate the memory and go back to defaults */ - kfree(chans[i]->rxgain); + if (chans[i]->gainalloc) + kfree(chans[i]->rxgain); chans[i]->rxgain = defgain; chans[i]->txgain = defgain; chans[i]->gainalloc = 0; |