desc may malloced in virtqueue_add() and should be freed before
leaving from the error handling cases, otherwise it will cause
memory leak.
Signed-off-by: Wei Yongjun <redacted>
---
drivers/virtio/virtio_ring.c | 1 +
1 file changed, 1 insertion(+)
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2016-08-02 14:05:07
On Tue, Aug 02, 2016 at 01:59:05PM +0000, Wei Yongjun wrote:
quoted hunk
desc may malloced in virtqueue_add() and should be freed before
leaving from the error handling cases, otherwise it will cause
memory leak.
Signed-off-by: Wei Yongjun <redacted>
---
drivers/virtio/virtio_ring.c | 1 +
1 file changed, 1 insertion(+)
'desc' is malloced in virtqueue_add() and should be freed before
leaving from the error handling cases, otherwise it will cause
memory leak.
Signed-off-by: Wei Yongjun <redacted>
---
drivers/virtio/virtio_ring.c | 2 ++
1 file changed, 2 insertions(+)
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2016-08-03 04:22:15
On Tue, Aug 02, 2016 at 02:16:31PM +0000, Wei Yongjun wrote:
'desc' is malloced in virtqueue_add() and should be freed before
leaving from the error handling cases, otherwise it will cause
memory leak.
Signed-off-by: Wei Yongjun <redacted>
Appliecd except I moved this to before END_USE - seems
cleaner as alloc is caller after START_USE.