mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
options: Fix a memory leak if we can't add an idenity.
This commit is contained in:
@@ -541,6 +541,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
|
|||||||
}
|
}
|
||||||
rc = ssh_list_prepend(session->opts.identity, q);
|
rc = ssh_list_prepend(session->opts.identity, q);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
|
free(q);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user