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:
Andreas Schneider
2020-01-23 09:21:04 +01:00
parent 8215753402
commit 06d25497ff

View File

@@ -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 *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=public");