[virt-tools-list] [virt-viewer v1] Fix filename leak on transfer dialog
Pavel Grunt
pgrunt at redhat.com
Fri Aug 5 09:02:47 UTC 2016
Pushed
On Wed, 2016-08-03 at 15:42 +0200, Christophe Fergeau wrote:
> Acked-by: Christophe Fergeau <cfergeau at redhat.com>
>
> On Wed, Aug 03, 2016 at 03:40:14PM +0200, Victor Toso wrote:
> >
> > spice_file_transfer_task_get_filename() was wrongly annotated as
> > transfer none. We can safely free this string after usage.
> > ---
> > src/virt-viewer-file-transfer-dialog.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/virt-viewer-file-transfer-dialog.c b/src/virt-viewer-file-
> > transfer-dialog.c
> > index b9da224..c8b50f0 100644
> > --- a/src/virt-viewer-file-transfer-dialog.c
> > +++ b/src/virt-viewer-file-transfer-dialog.c
> > @@ -101,11 +101,14 @@ typedef struct {
> > static TaskWidgets *task_widgets_new(SpiceFileTransferTask *task)
> > {
> > TaskWidgets *w = g_new0(TaskWidgets, 1);
> > + gchar *filename;
> >
> > w->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
> > w->hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
> > w->progress = gtk_progress_bar_new();
> > - w->label = gtk_label_new(spice_file_transfer_task_get_filename(task));
> > + filename = spice_file_transfer_task_get_filename(task);
> > + w->label = gtk_label_new(filename);
> > + g_free(filename);
> > w->cancel = gtk_button_new_from_icon_name("gtk-cancel",
> > GTK_ICON_SIZE_SMALL_TOOLBAR);
> > gtk_widget_set_hexpand(w->progress, TRUE);
> > gtk_widget_set_valign(w->progress, GTK_ALIGN_CENTER);
> > --
> > 2.7.4
> >
> > _______________________________________________
> > virt-tools-list mailing list
> > virt-tools-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/virt-tools-list
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
More information about the virt-tools-list
mailing list