From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Fehlig Subject: Re: [PATCH 1/3] libxl: fix ref counting of libxlMigrationDstArgs Date: Wed, 29 Jul 2015 16:07:49 -0600 Message-ID: <55B94EB5.1080004@suse.com> References: <1437079892-13804-1-git-send-email-jfehlig@suse.com> <1437079892-13804-2-git-send-email-jfehlig@suse.com> <20150720152834.GA23272@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150720152834.GA23272@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: libvir-list@redhat.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 07/20/2015 09:28 AM, Olaf Hering wrote: > On Thu, Jul 16, Jim Fehlig wrote: > >> @@ -448,6 +438,8 @@ libxlDomainMigrationPrepare(virConnectPtr dconn, >> virObjectUnref(socks[i]); >> } >> VIR_FREE(socks); >> + virObjectUnref(args); > This is now below the 'error' label, so args has to be initialized. > > [ 149s] libxl/libxl_migration.c: In function 'libxlDomainMigrationPrepare': > [ 149s] libxl/libxl_migration.c:463:19: warning: 'args' may be used uninitialized in this function [-Wmaybe-uninitialized] > [ 149s] virObjectUnref(args); > [ 149s] ^ Opps. I've squashed in the below obvious fix. Note it is safe to call virObjectUnref with a NULL object. Any other comments on this series? It fixes bugs in migration, including a possible libvirtd crash, and would be a candidate to push during freeze IMO. Regards, Jim