[gtranslator: 3/4] soup: Unref GBytes after using them




commit ec2b34500b0b6c8108659d18773bf6d40058c4a1
Author: Maximiliano Sandoval R <msandova gnome org>
Date:   Thu Mar 17 10:26:07 2022 +0100

    soup: Unref GBytes after using them

 src/gtr-actions-file.c | 1 +
 src/gtr-dl-teams.c     | 1 +
 2 files changed, 2 insertions(+)
---
diff --git a/src/gtr-actions-file.c b/src/gtr-actions-file.c
index 2afbaec5..64ed82a5 100644
--- a/src/gtr-actions-file.c
+++ b/src/gtr-actions-file.c
@@ -512,6 +512,7 @@ gtr_upload_file (GtkWidget *upload_dialog,
   /* Init multipart container */
   mpart = soup_multipart_new (SOUP_FORM_MIME_TYPE_MULTIPART);
   soup_multipart_append_form_file (mpart, "file", filename, mime_type, bytes);
+  g_bytes_unref (bytes);
   if (upload_comment)
     soup_multipart_append_form_string (mpart, "comment", upload_comment);
 
diff --git a/src/gtr-dl-teams.c b/src/gtr-dl-teams.c
index bd8efa2c..6567adb2 100644
--- a/src/gtr-dl-teams.c
+++ b/src/gtr-dl-teams.c
@@ -573,6 +573,7 @@ gtr_dl_teams_load_po_file (GtkButton *button, GtrDlTeams *self)
                                bytes,
                                NULL,
                                &error);
+  g_bytes_unref (bytes);
 
   if (error != NULL)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]