1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-28 01:41:48 +03:00

examples/libssh_scp: call ssh_init and ssh_finalize explicitly

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

View File

@ -404,10 +404,11 @@ int main(int argc, char **argv) {
int i;
int r;
if (opts(argc, argv) < 0) {
r = EXIT_FAILURE;
goto end;
return EXIT_FAILURE;
}
ssh_init();
dest = parse_location(destination);
if (dest == NULL) {
r = EXIT_FAILURE;
@ -449,5 +450,6 @@ close_dest:
close_location(dest);
location_free(dest);
end:
ssh_finalize();
return r;
}