summaryrefslogtreecommitdiff
path: root/usbredirparser
diff options
context:
space:
mode:
authorMichael Hanselmann <public@hansmi.ch>2021-06-15 13:04:50 +0200
committerVictor Toso <victortoso@redhat.com>2021-06-18 14:40:20 +0200
commitef3745f926f5b705b81f12e128f15af0106dae27 (patch)
tree1496daef0b0d9d5b9a6a6ffec2f38fa0166248a5 /usbredirparser
parent2e3fa970ebf42c11c5aece8955eb569188e9d7ba (diff)
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>
Diffstat (limited to 'usbredirparser')
-rw-r--r--usbredirparser/usbredirparser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usbredirparser/usbredirparser.c b/usbredirparser/usbredirparser.c
index acc55de..6640aa1 100644
--- a/usbredirparser/usbredirparser.c
+++ b/usbredirparser/usbredirparser.c
@@ -201,6 +201,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;