From nobody Wed May 1 11:12:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575624692; cv=none; d=zohomail.com; s=zohoarc; b=KdvATAEjh+lKkd1dBk4RFJ7MA5Q7+FTVf39YatCddmIjfOswxOcY4PYfNXuDkfUqxAE5QMOjuCg76t8pVXCfpmUD9jxr0dVa0v0vfEMZ5jLkrkRyt2N/pOffQk0QcOTVQQb4PFWd7cGBiVzet5dIPvONU+TDO2/bXnz8O42MAtc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575624692; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=iUnc3pCjMn01pPQv5vigbclfBplF2UXHmpoEdVWFnuk=; b=QNPcmr3jcfSnjRyZJYti4nlk1OkFdvQmrKMwUEegPK6Ei1Z8sWDTi26xS0Rb09oSLRidRzNBTGFNR+iTxYuy6sVxgddDqpHWLjPV2vjHCUTZn6J5otOGLgAG6Ur40+Q7hDJF2eRoHtxVq/KEhcvLNjPkEIhkZ4aKec0f/jatyuk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1575624692810677.3029319102993; Fri, 6 Dec 2019 01:31:32 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-279-tWn6_iyTPt6ht3LSntULAg-1; Fri, 06 Dec 2019 04:31:29 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 304F5800D5A; Fri, 6 Dec 2019 09:31:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0206A5D9C9; Fri, 6 Dec 2019 09:31:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A338E6B4AA; Fri, 6 Dec 2019 09:31:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB69UEwP026725 for ; Fri, 6 Dec 2019 04:30:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id AE4CC6013B; Fri, 6 Dec 2019 09:30:14 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 36BC06016B for ; Fri, 6 Dec 2019 09:30:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575624691; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=iUnc3pCjMn01pPQv5vigbclfBplF2UXHmpoEdVWFnuk=; b=UYiLwyCuGz3RnbSspKKp5JONU17j8CBJOBwmE39OUtYWvzrozLQGKvWYFH5U9QZ2qoc3Lh s+pH/YRbNqrUt5W0X+uyIKuXhLrJAlWuiMih3sblvjiX6VoPPb8o/C5iLtWQCy7lIdBfPp KJaWBQccEAdTm+hgWbTcgVFvQ/kQjpI= From: Michal Privoznik To: libvir-list@redhat.com Date: Fri, 6 Dec 2019 10:30:09 +0100 Message-Id: <4c53267b70fc5c548b6530113c3f96870d8d7fc1.1575624594.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu_monitor_text: Drop unused variable and avoid crash X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: tWn6_iyTPt6ht3LSntULAg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" In v5.8.0-rc1~122 we've removed the only use of @safename in qemuMonitorTextLoadSnapshot(). What we are left with is an declared but not initialized variable that is passed to VIR_FREE(). Caught by libvirt-php test suite. Signed-off-by: Michal Privoznik --- Pushed under trivial rule. src/qemu/qemu_monitor_text.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index 9054682d60..b387235821 100644 --- a/src/qemu/qemu_monitor_text.c +++ b/src/qemu/qemu_monitor_text.c @@ -161,7 +161,6 @@ int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, con= st char *name) char *cmd =3D NULL; char *reply =3D NULL; int ret =3D -1; - char *safename; =20 cmd =3D g_strdup_printf("loadvm \"%s\"", name); =20 @@ -194,7 +193,6 @@ int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, con= st char *name) ret =3D 0; =20 cleanup: - VIR_FREE(safename); VIR_FREE(cmd); VIR_FREE(reply); return ret; --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list