serial: core: fix transmit-buffer reset and memleak
This is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven. This ID is fixed in Linux Kernel version v4.9.292 by commit 011f6c92b5bf6e1fbfdedc8b5232f64c1c493206, it was introduced in version v4.9 by commit 761ed4a94582ab291aa24dcbea4e01e8936488c8. For more details please see the references link.