* [Qemu-devel] [PULL for-2.2 0/2] gtk: two bugfixes for 2.2.
@ 2014-11-21 9:25 Gerd Hoffmann
2014-11-21 9:25 ` [Qemu-devel] [PULL for-2.2 1/2] gtk: fix possible memory leak about local_err Gerd Hoffmann
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2014-11-21 9:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
Two gtk bugfixes for 2.2.
please pull,
Gerd
The following changes since commit 9c7074da5ec64e1fd61df881ab291f75541ff2b0:
hw/arm/virt: set stdout-path instead of linux,stdout-path (2014-11-20 14:58:37 +0000)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-gtk-20141121-1
for you to fetch changes up to b310a2a6095ec927a42cc1aba520a316be0faf51:
gtk: Don't crash if -nodefaults (2014-11-21 08:37:59 +0100)
----------------------------------------------------------------
gtk: two bugfixes for 2.2.
----------------------------------------------------------------
Fam Zheng (1):
gtk: Don't crash if -nodefaults
zhanghailiang (1):
gtk: fix possible memory leak about local_err
ui/gtk.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL for-2.2 1/2] gtk: fix possible memory leak about local_err
2014-11-21 9:25 [Qemu-devel] [PULL for-2.2 0/2] gtk: two bugfixes for 2.2 Gerd Hoffmann
@ 2014-11-21 9:25 ` Gerd Hoffmann
2014-11-21 9:25 ` [Qemu-devel] [PULL for-2.2 2/2] gtk: Don't crash if -nodefaults Gerd Hoffmann
2014-11-21 14:15 ` [Qemu-devel] [PULL for-2.2 0/2] gtk: two bugfixes for 2.2 Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2014-11-21 9:25 UTC (permalink / raw)
To: qemu-devel; +Cc: zhanghailiang, Anthony Liguori, Gerd Hoffmann
From: zhanghailiang <zhang.zhanghailiang@huawei.com>
local_err in gd_vc_gfx_init() is not freed, and we don't use it,
so remove it.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/gtk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index 38bf463..9496b8d 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1666,10 +1666,9 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
QemuConsole *con, int idx,
GSList *group, GtkWidget *view_menu)
{
- Error *local_err = NULL;
Object *obj;
- obj = object_property_get_link(OBJECT(con), "device", &local_err);
+ obj = object_property_get_link(OBJECT(con), "device", NULL);
if (obj) {
vc->label = g_strdup_printf("%s", object_get_typename(obj));
} else {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL for-2.2 2/2] gtk: Don't crash if -nodefaults
2014-11-21 9:25 [Qemu-devel] [PULL for-2.2 0/2] gtk: two bugfixes for 2.2 Gerd Hoffmann
2014-11-21 9:25 ` [Qemu-devel] [PULL for-2.2 1/2] gtk: fix possible memory leak about local_err Gerd Hoffmann
@ 2014-11-21 9:25 ` Gerd Hoffmann
2014-11-21 14:15 ` [Qemu-devel] [PULL for-2.2 0/2] gtk: two bugfixes for 2.2 Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2014-11-21 9:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Fam Zheng, Gerd Hoffmann, Anthony Liguori
From: Fam Zheng <famz@redhat.com>
This fixes a crash by just skipping the vte resize hack if cur is NULL.
Reproducer:
qemu-system-x86_64 -nodefaults
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/gtk.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index 9496b8d..0385757 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1909,15 +1909,17 @@ void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover)
#ifdef VTE_RESIZE_HACK
{
VirtualConsole *cur = gd_vc_find_current(s);
- int i;
-
- for (i = 0; i < s->nb_vcs; i++) {
- VirtualConsole *vc = &s->vc[i];
- if (vc && vc->type == GD_VC_VTE && vc != cur) {
- gtk_widget_hide(vc->vte.terminal);
+ if (cur) {
+ int i;
+
+ for (i = 0; i < s->nb_vcs; i++) {
+ VirtualConsole *vc = &s->vc[i];
+ if (vc && vc->type == GD_VC_VTE && vc != cur) {
+ gtk_widget_hide(vc->vte.terminal);
+ }
}
+ gd_update_windowsize(cur);
}
- gd_update_windowsize(cur);
}
#endif
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL for-2.2 0/2] gtk: two bugfixes for 2.2.
2014-11-21 9:25 [Qemu-devel] [PULL for-2.2 0/2] gtk: two bugfixes for 2.2 Gerd Hoffmann
2014-11-21 9:25 ` [Qemu-devel] [PULL for-2.2 1/2] gtk: fix possible memory leak about local_err Gerd Hoffmann
2014-11-21 9:25 ` [Qemu-devel] [PULL for-2.2 2/2] gtk: Don't crash if -nodefaults Gerd Hoffmann
@ 2014-11-21 14:15 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2014-11-21 14:15 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On 21 November 2014 09:25, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
> Two gtk bugfixes for 2.2.
>
> please pull,
> Gerd
>
> The following changes since commit 9c7074da5ec64e1fd61df881ab291f75541ff2b0:
>
> hw/arm/virt: set stdout-path instead of linux,stdout-path (2014-11-20 14:58:37 +0000)
>
> are available in the git repository at:
>
> git://git.kraxel.org/qemu tags/pull-gtk-20141121-1
>
> for you to fetch changes up to b310a2a6095ec927a42cc1aba520a316be0faf51:
>
> gtk: Don't crash if -nodefaults (2014-11-21 08:37:59 +0100)
>
> ----------------------------------------------------------------
> gtk: two bugfixes for 2.2.
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-21 14:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-21 9:25 [Qemu-devel] [PULL for-2.2 0/2] gtk: two bugfixes for 2.2 Gerd Hoffmann
2014-11-21 9:25 ` [Qemu-devel] [PULL for-2.2 1/2] gtk: fix possible memory leak about local_err Gerd Hoffmann
2014-11-21 9:25 ` [Qemu-devel] [PULL for-2.2 2/2] gtk: Don't crash if -nodefaults Gerd Hoffmann
2014-11-21 14:15 ` [Qemu-devel] [PULL for-2.2 0/2] gtk: two bugfixes for 2.2 Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).