Message ID | 20171006235023.11952-15-f4bug@amsat.org |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jxak0Im1"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y86LN2Wywz9t3R for <incoming@patchwork.ozlabs.org>; Sat, 7 Oct 2017 11:09:00 +1100 (AEDT) Received: from localhost ([::1]:47616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1e0cfq-0005K0-B0 for incoming@patchwork.ozlabs.org; Fri, 06 Oct 2017 20:08:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1e0cOo-0007Gr-2g for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:51:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1e0cOn-00054V-6X for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:51:22 -0400 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:53646) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1e0cOn-00054K-2V; Fri, 06 Oct 2017 19:51:21 -0400 Received: by mail-qt0-x244.google.com with SMTP id n61so6361497qte.10; Fri, 06 Oct 2017 16:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JdpHKL0Vafr+p5ghpOud2FOvXeUjkLarsFvUMM/s7zY=; b=jxak0Im1LI3skYaYSFypi83dGWgh8+Er7rnlBw5opL4Oobk/nl9bWYbE8S1c/OFrwC bt2MYTQE1SVR0jZpbRFU/0tjNDpeScWBIcAbsk+/XRMXkeaRbzxLkvYuze0//Rk70S3Y WCcVjp/aSm0mhTdxTo5H6drVUTgM5oP3cKjbFi6BpYi7SVbrsD5ziZSr42iQfSlHl1EG RGfgCNUcmI2DfxB+EIQDHoL1LDM03I4JLtRZHXWS84jcgxRfGNs0Rlc4awIDTBzR6lE/ OPqgq5uYooaXxJtcWJrTFgwLiNDkeaCOVaDkLAJmnKgqA/qREbxh31ricZSvVb/SQIna CDwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=JdpHKL0Vafr+p5ghpOud2FOvXeUjkLarsFvUMM/s7zY=; b=bo+7D/bXFLs4HghAUfHeLQGR2UHo6zUqxExk/KBT9Y5TcL5DkRmedGL/e3yHfG8K7w LvpWO6GyDwTBnewPOWhOefXhpJcIE/eEA2VuDD3rHpipngPEKpOAxKJGkC9NHJRY1ooF 9wZ54PC4wYkUH85RbY6N6LjnECacgmDHnv4mwZ7Xp9YSei+oOiTTKlOiKOxZFNssg537 bBwZsUQ1JmtKn5A3DuV+LMUnwNEpeHxZrQQKOzTHb7U85hKuE1Jk2a7omxDPmhQ8ktxa Ack69BnqkHxgQo8z8QNlTXG37BUDb51sy0gaRQpdYZLjeBnmotboEeOIA2aTDut+ITJu xgLA== X-Gm-Message-State: AMCzsaWmMucmMoNqHfH9yYeXU9KVTk3tO8WlvvQMZEaAsQ1IbqoJez+H VXgAH7GHo5+7OlXJkI1cyUI= X-Google-Smtp-Source: AOwi7QCR6z8WRB/tZRZig7i1RlX3H/ZMPMFM0HEI94accrVX85SbndSCPxr5EhwBNMaNZIwG6vWTHw== X-Received: by 10.237.37.76 with SMTP id w12mr174846qtc.201.1507333880574; Fri, 06 Oct 2017 16:51:20 -0700 (PDT) Received: from yoga.lan ([181.93.89.178]) by smtp.gmail.com with ESMTPSA id g1sm1705226qta.95.2017.10.06.16.51.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Oct 2017 16:51:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org> To: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@gmail.com>, Markus Armbruster <armbru@redhat.com>, Eric Blake <eblake@redhat.com>, Gerd Hoffmann <kraxel@redhat.com> Date: Fri, 6 Oct 2017 20:49:09 -0300 Message-Id: <20171006235023.11952-15-f4bug@amsat.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171006235023.11952-1-f4bug@amsat.org> References: <20171006235023.11952-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::244 Subject: [Qemu-devel] [PATCH 14/88] ui/vnc: use g_new() family of functions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Kevin Wolf <kwolf@redhat.com>, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>, qemu trival <qemu-trivial@nongnu.org>, qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
use g_new() family of functions
|
expand
|
diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index f38aceb4da..48ec584098 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -1475,7 +1475,7 @@ static int send_sub_rect(VncState *vs, int x, int y, int w, int h) #endif if (!color_count_palette) { - color_count_palette = g_malloc(sizeof(VncPalette)); + color_count_palette = g_new(VncPalette, 1); vnc_tight_cleanup_notifier.notify = vnc_tight_cleanup; qemu_thread_atexit_add(&vnc_tight_cleanup_notifier); } diff --git a/ui/vnc-palette.c b/ui/vnc-palette.c index dc7c0ba997..284e118715 100644 --- a/ui/vnc-palette.c +++ b/ui/vnc-palette.c @@ -56,7 +56,7 @@ VncPalette *palette_new(size_t max, int bpp) { VncPalette *palette; - palette = g_malloc0(sizeof(*palette)); + palette = g_new0(VncPalette, 1); palette_init(palette, max, bpp); return palette; } diff --git a/ui/vnc.c b/ui/vnc.c index 9f8d5a1b1f..b021fb398b 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -231,7 +231,7 @@ static VncServerInfo *vnc_server_info_get(VncDisplay *vd) return NULL; } - info = g_malloc0(sizeof(*info)); + info = g_new0(VncServerInfo, 1); vnc_init_basic_info_from_server_addr(vd->lsock[0], qapi_VncServerInfo_base(info), &err); info->has_auth = true; @@ -316,7 +316,7 @@ static VncClientInfo *qmp_query_vnc_client(const VncState *client) VncClientInfo *info; Error *err = NULL; - info = g_malloc0(sizeof(*info)); + info = g_new0(VncClientInfo, 1); vnc_init_basic_info_from_remote_addr(client->sioc, qapi_VncClientInfo_base(info), @@ -3047,7 +3047,7 @@ void vnc_display_init(const char *id) if (vnc_display_find(id) != NULL) { return; } - vd = g_malloc0(sizeof(*vd)); + vd = g_new0(VncDisplay, 1); vd->id = strdup(id); QTAILQ_INSERT_TAIL(&vnc_displays, vd, next);