From patchwork Sun Dec 8 23:40:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 180976 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp3655733ile; Sun, 8 Dec 2019 15:39:00 -0800 (PST) X-Google-Smtp-Source: APXvYqy2/PAOqdTk32+FFsD47+R4yHzAnPbVHvR9IC0Dym6EmMZODpogAaKASbzrRyKiqTWUzavK X-Received: by 2002:ac8:3905:: with SMTP id s5mr22852524qtb.158.1575848340345; Sun, 08 Dec 2019 15:39:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575848340; cv=none; d=google.com; s=arc-20160816; b=btKF3sz7jNa4fk6AAVqErjj3MtkLatn0wSd+BE9+AnpFkZQum02bzz1SqePFyqx+xJ 4ynMAIKbKTPzZIPMDtdphCn/Sjxte+2+Z9bcogPLbV+Mn6JIsnbykiJM+Ga76zkzsP9e Oct3FLR4igVaBz7jH0iYRMjU/Bjuh9idRL100Mkcmgiszx2p6UZbSWsXV6FoovFyfxpa oegIoo2Dw+CfNtM1MCqFivHvjhOcUBdge3zoCEFVI/K19sIDn9ZiIMhw4+GtbI4Vat2C WFdBKrIIjtm5kQ0SRVlX4Pc094nFtWPAtaNgraMKoczei2/vCaH6zJavtxiWu6ufSk1b xspQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:errors-to:sender:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:message-id:date:to:from:delivered-to:dkim-signature; bh=GmWa0jx684NhWn9FiEv0sxeJQviKl5x6YLfuLOVRr7g=; b=tTJ3+f0ZlVgC2K4O2HSQ1BZlrUzOUJWyLA+5vH280vPZJuLharwnnsrIp1DNRuDWrh yJdjFtenAINowPSCDkIgn7yQz5hHUVlf6+Iqx5tE7M9Oa+tB0xZedsPyqo3rfpthI4OT vLsST2TYK/FpWeci3iHN6hUPvl6hClbCImb74uzO6lbwrXsH3oUCT2vBUbS239eR2r89 /OccDoJtPiTmP56G4Doa4rRF1lUXcWWBTynLJc/k/dIHKqaxsum2e+4FSzl3RPKVfuUH 0sVlFUKBN7XjD07YNQIg38+NbiWCw/25rg8O4HYpU6SzM+o9+HJbHc2aqPBhqMRC39x/ 6bcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GLHVzNKD; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com. [205.139.110.61]) by mx.google.com with ESMTPS id g64si12736665qtd.308.2019.12.08.15.39.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Dec 2019 15:39:00 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GLHVzNKD; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575848340; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=GmWa0jx684NhWn9FiEv0sxeJQviKl5x6YLfuLOVRr7g=; b=GLHVzNKDBfZN7r3tqs5Ad3/f21/Fg0x6wM0CUpi3nHMiRcbjyC1tSo9SEBX5XsPEtivtu1 5eZ1oRUxzZlhNNbG8xrasF6iw7scsDkMqH2RrQFkmCF5colD9Rdg465prQFkw29DtsxIFX LQ9niBvNWOLqxRrQRMsv3JAYQoqdbrc= 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-230-ql0FiCzePcKPGsOKzL1W3g-1; Sun, 08 Dec 2019 18:38:58 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2D783801E74; Sun, 8 Dec 2019 23:38:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0152960BEC; Sun, 8 Dec 2019 23:38:52 +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 B7CEB18089CE; Sun, 8 Dec 2019 23:38:52 +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 xB8Ncp5Z016901 for ; Sun, 8 Dec 2019 18:38:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id 75AEC60484; Sun, 8 Dec 2019 23:38:51 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-120-182.rdu2.redhat.com [10.10.120.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC656600D3; Sun, 8 Dec 2019 23:38:48 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Sun, 8 Dec 2019 18:40:05 -0500 Message-Id: <425bd547c5348dc28f885a70fed0a94a0c4e028b.1575848405.git.crobinso@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Cole Robinson Subject: [libvirt] [PATCH] qemu: checkpoint: fix NULL dereference at create time 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.12 X-MC-Unique: ql0FiCzePcKPGsOKzL1W3g-1 X-Mimecast-Spam-Score: 0 'cfg' is never initialized here, which causes a crash later in qemuCheckpointCreateFinalize Signed-off-by: Cole Robinson --- src/qemu/qemu_checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Reviewed-by: Peter Krempa diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c index d5af6b99bf..58cf337833 100644 --- a/src/qemu/qemu_checkpoint.c +++ b/src/qemu/qemu_checkpoint.c @@ -468,7 +468,7 @@ qemuCheckpointCreateXML(virDomainPtr domain, bool update_current = true; bool redefine = flags & VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE; unsigned int parse_flags = 0; - g_autoptr(virQEMUDriverConfig) cfg = NULL; + g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver); g_autoptr(virCaps) caps = NULL; g_autoptr(virDomainCheckpointDef) def = NULL;