From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zbg1q-0008FS-68 for qemu-devel@nongnu.org; Mon, 14 Sep 2015 22:31:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zbg1n-0003hD-GT for qemu-devel@nongnu.org; Mon, 14 Sep 2015 22:31:30 -0400 Date: Tue, 15 Sep 2015 10:31:24 +0800 From: Fam Zheng Message-ID: <20150915023124.GF14016@ad.nay.redhat.com> References: <1442229154-2052-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1442229154-2052-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block/ssh: remove dead code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-trivial@nongnu.org, jcody@redhat.com, qemu-devel@nongnu.org, rjones@redhat.com On Mon, 09/14 13:12, Paolo Bonzini wrote: > The "err" label cannot be reached with qp != NULL. Remove the free-ing > of qp and avoid future regressions by removing the initializer. > > Signed-off-by: Paolo Bonzini > --- > block/ssh.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/block/ssh.c b/block/ssh.c > index 8d06739..d35b51f 100644 > --- a/block/ssh.c > +++ b/block/ssh.c > @@ -193,7 +193,7 @@ sftp_error_report(BDRVSSHState *s, const char *fs, ...) > static int parse_uri(const char *filename, QDict *options, Error **errp) > { > URI *uri = NULL; > - QueryParams *qp = NULL; > + QueryParams *qp; > int i; > > uri = uri_parse(filename); > @@ -249,9 +249,6 @@ static int parse_uri(const char *filename, QDict *options, Error **errp) > return 0; > > err: > - if (qp) { > - query_params_free(qp); > - } > if (uri) { > uri_free(uri); > } > -- > 2.5.0 > > Reviewed-by: Fam Zheng