diff options
Diffstat (limited to 'drivers/char/virtio_console.c')
-rw-r--r-- | drivers/char/virtio_console.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 6a369942da84..09d193dbb233 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -881,6 +881,8 @@ static ssize_t port_fops_splice_write(struct pipe_inode_info *pipe, if (likely(ret > 0)) ret = send_pages(port, sgl.sg, sgl.n, sgl.len, true); + if (unlikely(ret <= 0)) + kfree(sgl.sg); return ret; } |