fix memory leak in encfsctl showKey command

This commit is contained in:
Valient Gough 2016-09-08 09:48:42 +02:00
parent 0eb4641fd7
commit b0b4f8de4d
No known key found for this signature in database
GPG Key ID: B515DCEB95967051

View File

@ -196,7 +196,11 @@ string Cipher::encodeAsString(const CipherKey &key,
B64ToAscii(b64Key, b64Len);
b64Key[b64Len - 1] = '\0';
return string((const char *)b64Key);
string str((const char *)b64Key);
delete[] b64Key;
delete[] keyBuf;
return str;
}
} // namespace encfs