[gnome-remote-desktop/gnome-42] 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/gnome-42] clipboard-rdp: Don't leak mime type table when FormatDataRequest fails
- Date: Thu, 1 Sep 2022 15:16:11 +0000 (UTC)
commit 6b6f565285404cd7f9642458543c5bde36eebc48
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 c010999a..7b7f7501 100644
--- a/src/grd-clipboard-rdp.c
+++ b/src/grd-clipboard-rdp.c
@@ -589,7 +589,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]