aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-09-14 13:12:34 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2015-10-08 19:46:01 +0300
commiteab2ac9d3c1675a58989000c2647aa33e440906a (patch)
tree96b48138e7d10678b42dcb0faca8b25405f12fd4 /block
parentdc1442204a2235b1ad0c4bdceb3580c97f71f1b5 (diff)
downloadqemu-eab2ac9d3c1675a58989000c2647aa33e440906a.zip
qemu-eab2ac9d3c1675a58989000c2647aa33e440906a.tar.gz
qemu-eab2ac9d3c1675a58989000c2647aa33e440906a.tar.bz2
block/ssh: remove dead code
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 <pbonzini@redhat.com> ACKed-by: Richard W.M. Jones <rjones@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'block')
-rw-r--r--block/ssh.c5
1 files changed, 1 insertions, 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);
}