From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KusJb-00019Q-QD for qemu-devel@nongnu.org; Tue, 28 Oct 2008 13:25:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KusJZ-00018E-Vl for qemu-devel@nongnu.org; Tue, 28 Oct 2008 13:25:11 -0400 Received: from [199.232.76.173] (port=60034 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KusJZ-00018B-Q1 for qemu-devel@nongnu.org; Tue, 28 Oct 2008 13:25:09 -0400 Received: from an-out-0708.google.com ([209.85.132.243]:50498) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KusJZ-000895-8Z for qemu-devel@nongnu.org; Tue, 28 Oct 2008 13:25:09 -0400 Received: by an-out-0708.google.com with SMTP id d18so206543and.130 for ; Tue, 28 Oct 2008 10:25:05 -0700 (PDT) Message-ID: Date: Tue, 28 Oct 2008 19:25:04 +0200 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH 3/4] sockets: switch vnc to new code, support vnc port auto-allocation. In-Reply-To: <1225198518-16529-4-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1225198518-16529-1-git-send-email-kraxel@redhat.com> <1225198518-16529-4-git-send-email-kraxel@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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? It looks like it will leak memory if display is "none".