mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +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);
|
||||
if (rc < 0) {
|
||||
free(id);
|
||||
ssh_free(new);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user