From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kuuhq-000554-Rb for qemu-devel@nongnu.org; Tue, 28 Oct 2008 15:58:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kuuho-00054q-TE for qemu-devel@nongnu.org; Tue, 28 Oct 2008 15:58:22 -0400 Received: from [199.232.76.173] (port=52093 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kuuho-00054n-ND for qemu-devel@nongnu.org; Tue, 28 Oct 2008 15:58:20 -0400 Received: from mx2.redhat.com ([66.187.237.31]:60197) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kuuho-0005U1-8J for qemu-devel@nongnu.org; Tue, 28 Oct 2008 15:58:20 -0400 Message-ID: <49076EC4.70909@redhat.com> Date: Tue, 28 Oct 2008 20:57:56 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3/4] sockets: switch vnc to new code, support vnc port auto-allocation. References: <1225198518-16529-1-git-send-email-kraxel@redhat.com> <1225198518-16529-4-git-send-email-kraxel@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org Blue Swirl wrote: > On 10/28/08, Gerd Hoffmann wrote: >> This patch switches the vnc code ofer to the new socket helper >> functions. >> - if (strcmp(display, "none") == 0) >> - return 0; >> - >> if (!(vs->display = strdup(display))) >> return -1; >> + if (strcmp(display, "none") == 0) >> + return 0; > > Why this change? To keep vs->display and thus the "info vnc" output up-to-date. Without this you'll see stale information after "change vnc none". > It looks like it will leak memory if display is "none". Oops, yes. Will fix. cheers, Gerd