From nobody Fri Mar 29 05:39:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 14994633598511022.2750839082429; Fri, 7 Jul 2017 14:35:59 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id C832CC05FFE2; Fri, 7 Jul 2017 21:35:57 +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 764FB183A7; Fri, 7 Jul 2017 21:35:56 +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 0A2101803B26; Fri, 7 Jul 2017 21:35:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v67LZqNO030046 for ; Fri, 7 Jul 2017 17:35:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id F29D471C25; Fri, 7 Jul 2017 21:35:51 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB5C45C541 for ; Fri, 7 Jul 2017 21:35:49 +0000 (UTC) Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 34FA661B8D for ; Fri, 7 Jul 2017 21:35:48 +0000 (UTC) Received: by mail-qt0-f193.google.com with SMTP id c20so5839412qte.0 for ; Fri, 07 Jul 2017 14:35:48 -0700 (PDT) Received: from localhost.localdomain ([187.107.182.7]) by smtp.googlemail.com with ESMTPSA id h68sm3162515qke.48.2017.07.07.14.35.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Jul 2017 14:35:46 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C832CC05FFE2 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C832CC05FFE2 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eokwx8nf" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 34FA661B8D Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jcfaracco@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 34FA661B8D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=XKZxH9sG6D/AaQK4/lKB74F/EELgWhxV0o43sae34r4=; b=eokwx8nfi2q6OFrAfIQrFHkrqbt6Oa3S70P5J2u6eOMZ1LDn9l92bDgwE0AEW97Sfi toM5Wz2QnkvY6tBljKiBf/msZqjj5Fox3YgI90EwDZTZ0Os12zlznajWHb+Xylthd7Db yhwSjTgVt9lPmC7SOi1kT5RZ58miRjD07xRXldRWUFpE+POLuCcTu89XRC7uVG6ceCFV 4Hxvv0JNDO3Z1YwlHzZnf26hi660blAzSPJ44nMO85qixQ38VZ9oJwdl8/HYY13HowLp pn8h0j2UGTXbM2WTHQtVvP0bN5GwdC9wkSWsENfAjEdYE3jsir7d95bLInPv1DgY1zWr acBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=XKZxH9sG6D/AaQK4/lKB74F/EELgWhxV0o43sae34r4=; b=mOcSWdHDyPcUgGvKQ3iGd6q4looyVOVmCeb7sDo4JurHq46ImpNtmH01lfdyT+cek6 +xiDJ61EwzfY/fQCmfOZTl3V6EFdpuNsGCJXLD5jYvf9ZPFVtUm5dPlUSliVhvvjVoCH bv0oWeHxorrKez4V0GY8ihAVqAMtaNBj+PNYqLSHhG2++eq5fECN9nbhOAo8mV1Ydm+s ErzugOGO7MwzzgKB26JhgBLIyuj6N8XnJXs4u+DLvuNPF5hpBemfkxFt79wYm5BxIZyW POUVlPrD/o7b4pM0nUN6yef3gJ5d+Z5+4A4PQNEU6Ob2i0SKZxwA4MZPK8D3M4Fry9C1 fLPQ== X-Gm-Message-State: AIVw113VQOAhyu6ysRRRp7xivv8ZchBMmFtN96Bd1+HtpIlkQSTHgaLz 1G7Q6MAx7QOaSi5B X-Received: by 10.237.46.166 with SMTP id k35mr10404056qtd.21.1499463347275; Fri, 07 Jul 2017 14:35:47 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Date: Fri, 7 Jul 2017 18:35:33 -0300 Message-Id: <1499463333-29525-1-git-send-email-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 07 Jul 2017 21:35:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 07 Jul 2017 21:35:48 +0000 (UTC) for IP:'209.85.216.193' DOMAIN:'mail-qt0-f193.google.com' HELO:'mail-qt0-f193.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.17 * (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.216.193 mail-qt0-f193.google.com 209.85.216.193 mail-qt0-f193.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] tools: domdisplay command is not freeing the domain pointer. 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 07 Jul 2017 21:35:58 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The command 'domdisplay' is not freeing the domain pointer properly in=20 cleanup section. See the error below: virsh # domdisplay WINDOWS7 vnc://127.0.0.1:0 virsh # quit error: One or more references were leaked after disconnect from the hypervi= sor Valgrind report: =3D=3D29168=3D=3D 66 (56 direct, 10 indirect) bytes in 1 blocks are definit= ely lost in loss record 154 of 239 =3D=3D29168=3D=3D at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_m= emcheck-amd64-linux.so) =3D=3D29168=3D=3D by 0x5505324: virAllocVar (viralloc.c:560) =3D=3D29168=3D=3D by 0x555A61B: virObjectNew (virobject.c:199) =3D=3D29168=3D=3D by 0x561F367: virGetDomain (datatypes.c:284) =3D=3D29168=3D=3D by 0x5680979: get_nonnull_domain (remote_driver.c:8143) =3D=3D29168=3D=3D by 0x5680979: remoteDomainLookupByName (remote_client_= bodies.h:3047) =3D=3D29168=3D=3D by 0x5623D9A: virDomainLookupByName (libvirt-domain.c:= 425) =3D=3D29168=3D=3D by 0x160480: virshLookupDomainInternal (virsh-util.c:5= 9) =3D=3D29168=3D=3D by 0x160547: virshCommandOptDomainBy (virsh-util.c:98) =3D=3D29168=3D=3D by 0x13D3A9: cmdDomDisplay (virsh-domain.c:10963) =3D=3D29168=3D=3D by 0x165680: vshCommandRun (vsh.c:1327) =3D=3D29168=3D=3D by 0x12E320: main (virsh.c:953) Signed-off-by: Julio Faracco --- tools/virsh-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 55f4e14..8f3d4d5 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -11153,6 +11153,7 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd) VIR_FREE(output); xmlXPathFreeContext(ctxt); xmlFreeDoc(xml); + virshDomainFree(dom); return ret; } =20 --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list