[client,SDL] use CStringPtr to guard allocated C strings

This commit is contained in:
Armin Novak
2025-12-03 14:20:01 +01:00
parent 29f5901e25
commit f533089b98
2 changed files with 2 additions and 2 deletions

View File

@@ -117,7 +117,7 @@ BOOL sdl_authenticate_ex(freerdp* instance, char** username, char** password, ch
size_t titlesize = 0;
winpr_asprintf(&title, &titlesize, "Credentials required for %s", target);
std::unique_ptr<char, decltype(&free)> scope(title, free);
CStringPtr scope(title, free);
char* u = nullptr;
char* d = nullptr;
char* p = nullptr;

View File

@@ -117,7 +117,7 @@ BOOL sdl_authenticate_ex(freerdp* instance, char** username, char** password, ch
size_t titlesize = 0;
winpr_asprintf(&title, &titlesize, "Credentials required for %s", target);
std::unique_ptr<char, decltype(&free)> guard(title, free);
CStringPtr guard(title, free);
char* u = nullptr;
char* d = nullptr;
char* p = nullptr;