From nobody Mon Feb 9 01:20:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1639421014; cv=none; d=zohomail.com; s=zohoarc; b=O7fcPWzz0JA0as3dYCwpcz/7L8sFSDWFfqoaxYBJipQGXBi6gmShFn8CTLkW5HwkNkMluTVDpqrcFNqfmOiblIBTvWOuaZ5HG25TMTjzmBU9wFzRt8c+bK71Y9Cgngyr48k4Jjeod2ZOE+lnP+0mogvVyBnx53pJPmg9iVDMdtE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639421014; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZMHSkurioLQQXW7TjkvrdTHBB3mj/7OXwDQFhtWtGlg=; b=jZ8G/mjUHanjI7EyXZe5q9hMlSVMTcUDuYzDEUMl0Bu6nFzE9IfDKabbbpLUEu/531eaiYH0LGlRqAUE58+bVUiiKHX56oXiF3B6hv6O99NDZvtafoiEnFtBxcMs43K0bFIi+I0RA2GNPi3SkGaWh1ERFCXb2LBjwaJnFG5JspA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1639421014324745.2902037392613; Mon, 13 Dec 2021 10:43:34 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-529-DIfURqPGMNmFi498RCMu2g-1; Mon, 13 Dec 2021 13:43:31 -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 4F909102CB76; Mon, 13 Dec 2021 18:43:25 +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 CEBF76107F; Mon, 13 Dec 2021 18:43: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 13A334CA93; Mon, 13 Dec 2021 18:43:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BDIhIt5003820 for ; Mon, 13 Dec 2021 13:43:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6D8AF60C17; Mon, 13 Dec 2021 18:43:18 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id E922D60C04 for ; Mon, 13 Dec 2021 18:43:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639421013; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ZMHSkurioLQQXW7TjkvrdTHBB3mj/7OXwDQFhtWtGlg=; b=cc12NH1ya/ONm9XHzl+PAt5WhIJgfxsLk0D2EKh+sC1mzMFg4rsQeVC4KutH6J2vsIGB8g 6O5DTuWI17dcWu83JJwSBoDPke7+qt1o4GC4u65y6WOVoByFS5puOqzAocrRn89WX7nX9V +IdIh5eMvJpSogRvDsls1T8NhN3CSjs= X-MC-Unique: DIfURqPGMNmFi498RCMu2g-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 04/20] openvz: refactor openvzDomainDefineCmd Date: Mon, 13 Dec 2021 19:42:56 +0100 Message-Id: <4cbd4615a28a18509cec8b7debaeb77bed18165e.1639420923.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639421015648100001 Signed-off-by: J=C3=A1n Tomko --- src/openvz/openvz_driver.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index ce3262c0e2..efd334a235 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -118,15 +118,14 @@ openvzDomObjFromDomain(struct openvz_driver *driver, static virCommand * openvzDomainDefineCmd(virDomainDef *vmdef) { - virCommand *cmd =3D virCommandNewArgList(VZCTL, - "--quiet", - "create", - NULL); + g_autoptr(virCommand) cmd =3D virCommandNewArgList(VZCTL, + "--quiet", + "create", + NULL); =20 if (vmdef =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Container is not defined")); - virCommandFree(cmd); return NULL; } =20 @@ -137,7 +136,7 @@ openvzDomainDefineCmd(virDomainDef *vmdef) virCommandAddArgList(cmd, "--ostemplate", vmdef->fss[0]->src, NULL= ); } =20 - return cmd; + return g_steal_pointer(&cmd); } =20 =20 --=20 2.31.1