qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block/ssh: remove dead code


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH] block/ssh: remove dead code
Date: Tue, 15 Sep 2015 10:31:24 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

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 <address@hidden>
> ---
>  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 <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]