[gnome-control-center] printers: Remove a memory leak



commit 1ed138e9577ec6e7f6a423870b0e79dba3506472
Author: Marek Kasik <mkasik redhat com>
Date:   Thu Jan 30 14:19:03 2014 +0100

    printers: Remove a memory leak
    
    TDevice and PpPrintDevice structures have "host_name" member which
    should be freed too.

 panels/printers/pp-new-printer-dialog.c |    1 +
 panels/printers/pp-utils.c              |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/panels/printers/pp-new-printer-dialog.c b/panels/printers/pp-new-printer-dialog.c
index 91ed4a8..36c043d 100644
--- a/panels/printers/pp-new-printer-dialog.c
+++ b/panels/printers/pp-new-printer-dialog.c
@@ -798,6 +798,7 @@ t_device_free (gpointer data)
       g_free (device->device_uri);
       g_free (device->device_id);
       g_free (device->device_ppd);
+      g_free (device->host_name);
       g_free (device);
     }
 }
diff --git a/panels/printers/pp-utils.c b/panels/printers/pp-utils.c
index 09f57ce..243866a 100644
--- a/panels/printers/pp-utils.c
+++ b/panels/printers/pp-utils.c
@@ -3773,6 +3773,7 @@ pp_print_device_free (PpPrintDevice *device)
       g_free (device->device_location);
       g_free (device->device_name);
       g_free (device->device_ppd);
+      g_free (device->host_name);
       g_free (device);
     }
 }


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