mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix error, parameter return via string reference from static text
This commit is contained in:
parent
094904ab0f
commit
9a35b846dc
@ -79,23 +79,17 @@ namespace controller {
|
||||
|
||||
auto pubkey = getModel()->getPublicKey();
|
||||
|
||||
if (pubkey) {
|
||||
if (pubkey)
|
||||
{
|
||||
auto pubkeyHex = mm->getFreeMemory(65);
|
||||
memset(*pubkeyHex, 0, 65);
|
||||
sodium_bin2hex(*pubkeyHex, 65, pubkey, 32);
|
||||
mPublicHex = (char*)*pubkeyHex;
|
||||
mm->releaseMemory(pubkeyHex);
|
||||
unlock();
|
||||
return mPublicHex;
|
||||
}
|
||||
else {
|
||||
unlock();
|
||||
return "";
|
||||
mm->releaseMemory(pubkeyHex);
|
||||
}
|
||||
|
||||
unlock();
|
||||
return "<error>";
|
||||
|
||||
return mPublicHex;
|
||||
}
|
||||
|
||||
Poco::JSON::Object User::getJson()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user