When the lirc drivers were converted over to using memdup_user, I mistakenly also removed corresponding calls to kfree. Add those back. I also screwed up on the allocation error check in lirc_serial, using if (PTR_ERR()) instead of if (IS_ERR()), which broke transmit.
Showing the changes to drivers/staging/lirc/lirc_sir.c (1 of 6 files). Show all
Unified · Split
| @@ -330,6 +330,7 @@ static ssize_t lirc_write(struct file *file, const char *buf, size_t n, · 329 unmodified lines | ||
| 330 | 330 | /* enable receiver */ |
| 331 | 331 | Ser2UTCR3 = UTCR3_RXE|UTCR3_RIE; |
| 332 | 332 | #endif |
| 333 | + kfree(tx_buf); | |
| 333 | 334 | return count; |
| 334 | 335 | } |
| 335 | 336 | |