[gnome-remote-desktop] clipboard-rdp: Don't leak mime type table when FormatDataRequest fails
- From: Jonas Ã…dahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] clipboard-rdp: Don't leak mime type table when FormatDataRequest fails
- Date: Fri, 19 Aug 2022 17:05:15 +0000 (UTC)
commit 5efcb80f4c01dc4689d34bd801000a0e68962213
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Thu Aug 18 10:26:31 2022 +0200
clipboard-rdp: Don't leak mime type table when FormatDataRequest fails
It is unlikely that preparing the FormatDataRequest fails. But in case
the preparation of sending that PDU fails, don't leak the mime type
table.
Free the mime type table manually without the usage of an autopointer
to preserve the existing tail call optimization, when performing the
next mime type content request.
src/grd-clipboard-rdp.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/grd-clipboard-rdp.c b/src/grd-clipboard-rdp.c
index 55dc996d..ebe93ed2 100644
--- a/src/grd-clipboard-rdp.c
+++ b/src/grd-clipboard-rdp.c
@@ -598,7 +598,10 @@ maybe_send_next_mime_type_content_request (GrdClipboardRdp *clipboard_rdp)
g_free (mime_type_table);
maybe_send_next_mime_type_content_request (clipboard_rdp);
+ return;
}
+
+ g_free (mime_type_table);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]