From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtuA2-0001fL-Mm for qemu-devel@nongnu.org; Tue, 02 Jul 2013 02:34:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Utu9y-0002JR-In for qemu-devel@nongnu.org; Tue, 02 Jul 2013 02:33:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utu9y-0002JH-AQ for qemu-devel@nongnu.org; Tue, 02 Jul 2013 02:33:54 -0400 Message-ID: <51D274DB.1080009@redhat.com> Date: Tue, 02 Jul 2013 08:36:11 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 08/10] qemu-ga: call Windows VSS requester in fsfreeze command handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tomoki Sekiyama Cc: "libaiqing@huawei.com" , "mdroth@linux.vnet.ibm.com" , "stefanha@gmail.com" , "qemu-devel@nongnu.org" , "lcapitulino@redhat.com" , "vrozenfe@redhat.com" , "pbonzini@redhat.com" , Seiji Aguchi , "areis@redhat.com" On 07/01/13 19:59, Tomoki Sekiyama wrote: > On 7/1/13 9:29 , "Laszlo Ersek" wrote: > >>> +error: >>> + qmp_guest_fsfreeze_thaw(NULL); >> >> Passing NULL here as "errp" concerns me slightly. I've been assuming >> that "errp" is never NULL due to the outermost QMP layer always wanting >> to receive errors and to serialize them. >> >> Specifically, a NULL "errp" would turn all error_set*(errp, ...) calls >> into no-ops under qmp_guest_fsfreeze_thaw(), and all error_is_set(errp) >> questions would answer with false. That said, nothing seems to be >> affected right now. >> >> Maybe a dummy local variable would be more future-proof... OTOH it would >> be stylistically questionable :) > > OK, then it should be: > Error *local_err = NULL; > ... > error: > qmp_guest_fsfreeze_thaw(&local_err); > if (error_is_set(&local_err)) { > error_free(local_err); > } I think so, yes. You could also log it before freeing it I guess: g_debug("cleanup thaw: %s", error_get_pretty(local_err)); or some such, but it's probably not important. Thanks, Laszlo