mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
pki: Avoid uneeded memory duplication
CID #1412375 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -1610,9 +1610,9 @@ bool ssh_pki_is_uri(const char *cmp)
|
|||||||
*/
|
*/
|
||||||
char *ssh_pki_export_pub_uri_from_priv_uri(const char *priv_uri)
|
char *ssh_pki_export_pub_uri_from_priv_uri(const char *priv_uri)
|
||||||
{
|
{
|
||||||
char *pub_uri_temp = strdup(priv_uri);
|
char *pub_uri_temp = NULL;
|
||||||
|
|
||||||
pub_uri_temp = ssh_strreplace(pub_uri_temp,
|
pub_uri_temp = ssh_strreplace(priv_uri,
|
||||||
"type=private",
|
"type=private",
|
||||||
"type=public");
|
"type=public");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user