1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-06-05 01:42:10 +03:00

examples/libssh_scp: Remove the duplication of free(loc->host)

and free sources at the end of program

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Change-Id: Ia6a51d52439722b46547449e85350b3193e5ba28
This commit is contained in:
Xiang Xiao 2021-05-06 22:54:10 -07:00 committed by Jakub Jelen
parent 46624648f9
commit 43a31b81f2

View File

@ -105,10 +105,6 @@ static void location_free(struct location *loc)
free(loc->user);
}
loc->user = NULL;
if (loc->host) {
free(loc->host);
}
loc->host = NULL;
}
free(loc);
}
@ -451,5 +447,6 @@ close_dest:
location_free(dest);
end:
ssh_finalize();
free(sources);
return r;
}