From 4c467d5089df07fcaf7ceb5af7866e0fdcf310b9 Mon Sep 17 00:00:00 2001 From: Mike Jumper Date: Thu, 26 Oct 2023 12:16:08 -0700 Subject: [PATCH] GUACAMOLE-1290: Migrate SSH certificate auth support to new memory management functions. --- src/common-ssh/user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common-ssh/user.c b/src/common-ssh/user.c index 7c2548320..3ebb31d59 100644 --- a/src/common-ssh/user.c +++ b/src/common-ssh/user.c @@ -89,8 +89,8 @@ int guac_common_ssh_user_import_public_key(guac_common_ssh_user* user, char* public_key) { /* Free existing public key, if present */ - free(user->public_key); - user->public_key = strdup(public_key); + guac_mem_free(user->public_key); + user->public_key = guac_strdup(public_key); /* Fail if key could not be read */ return user->public_key == NULL;