mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
options: Fix a memory in ssh_options_copy() on error.
This commit is contained in:
@@ -112,6 +112,7 @@ int ssh_options_copy(ssh_session src, ssh_session *dest) {
|
|||||||
|
|
||||||
rc = ssh_list_append(new->opts.identity, id);
|
rc = ssh_list_append(new->opts.identity, id);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
|
free(id);
|
||||||
ssh_free(new);
|
ssh_free(new);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user