From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvWqi-0008VQ-1S for qemu-devel@nongnu.org; Wed, 16 Jan 2013 12:32:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvWqe-00014u-U7 for qemu-devel@nongnu.org; Wed, 16 Jan 2013 12:32:27 -0500 From: Markus Armbruster Date: Wed, 16 Jan 2013 18:32:14 +0100 Message-Id: <1358357540-29862-6-git-send-email-armbru@redhat.com> In-Reply-To: <1358357540-29862-1-git-send-email-armbru@redhat.com> References: <1358357540-29862-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH v2 05/11] spice: Fix unchecked strdup() by converting to g_strdup() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- ui/spice-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/spice-core.c b/ui/spice-core.c index 3f2c565..bcc4199 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -848,8 +848,8 @@ static int qemu_spice_set_ticket(bool fail_if_conn, bool disconnect_if_conn) int qemu_spice_set_passwd(const char *passwd, bool fail_if_conn, bool disconnect_if_conn) { - free(auth_passwd); - auth_passwd = strdup(passwd); + g_free(auth_passwd); + auth_passwd = g_strdup(passwd); return qemu_spice_set_ticket(fail_if_conn, disconnect_if_conn); } -- 1.7.11.7