31 lines
1005 B
Diff
31 lines
1005 B
Diff
From 6d12abee7aadb757565a26f8243e46b1718fcb7e Mon Sep 17 00:00:00 2001
|
|
From: Michael Hanselmann <public@hansmi.ch>
|
|
Date: Tue, 15 Jun 2021 13:04:50 +0200
|
|
Subject: [PATCH] usbredirparser: free parser's data on destroy
|
|
|
|
Ref: https://gitlab.freedesktop.org/spice/usbredir/-/merge_requests/25#note_962929
|
|
|
|
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
|
|
Signed-off-by: Victor Toso <victortoso@redhat.com>
|
|
---
|
|
usbredirparser/usbredirparser.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/usbredirparser/usbredirparser.c b/usbredirparser/usbredirparser.c
|
|
index 5d19e38..c158c66 100644
|
|
--- a/usbredirparser/usbredirparser.c
|
|
+++ b/usbredirparser/usbredirparser.c
|
|
@@ -193,6 +193,9 @@ void usbredirparser_destroy(struct usbredirparser *parser_pub)
|
|
(struct usbredirparser_priv *)parser_pub;
|
|
struct usbredirparser_buf *wbuf, *next_wbuf;
|
|
|
|
+ free(parser->data);
|
|
+ parser->data = NULL;
|
|
+
|
|
wbuf = parser->write_buf;
|
|
while (wbuf) {
|
|
next_wbuf = wbuf->next;
|
|
--
|
|
1.8.3.1
|
|
|