[PATCH 2/2] bcrypt: Implement BCryptFreeBuffer().
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> --- dlls/bcrypt/bcrypt_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c index 98ae8c97e3a..2c0d2f8f965 100644 --- a/dlls/bcrypt/bcrypt_main.c +++ b/dlls/bcrypt/bcrypt_main.c @@ -75,7 +75,7 @@ NTSTATUS WINAPI BCryptEnumContextFunctions( ULONG table, const WCHAR *ctx, ULONG void WINAPI BCryptFreeBuffer( void *buffer ) { - FIXME( "%p\n", buffer ); + free( buffer ); } NTSTATUS WINAPI BCryptRegisterProvider( const WCHAR *provider, ULONG flags, CRYPT_PROVIDER_REG *reg ) -- 2.30.2
On Wed, Apr 6, 2022 at 4:38 AM Hans Leidekker <hans(a)codeweavers.com> wrote:
void WINAPI BCryptFreeBuffer( void *buffer ) { - FIXME( "%p\n", buffer ); + free( buffer ); }
Is this how similar functions are generally implemented? I'm assuming this only applies to simple variables and not something like a struct, which I think requires freeing each member. I was going to implement it myself but I didn't feel confident just one line would suffice. -- Kind regards, Mohamad
On Wed, 2022-04-06 at 04:50 -0400, Mohamad Al-Jaf wrote:
On Wed, Apr 6, 2022 at 4:38 AM Hans Leidekker <hans(a)codeweavers.com> wrote:
void WINAPI BCryptFreeBuffer( void *buffer ) { - FIXME( "%p\n", buffer ); + free( buffer ); }
Is this how similar functions are generally implemented? I'm assuming this only applies to simple variables and not something like a struct, which I think requires freeing each member. I was going to implement it myself but I didn't feel confident just one line would suffice.
It depends on how memory is returned to the caller. So far we return flat buffers, so this is fine.
participants (2)
-
Hans Leidekker -
Mohamad Al-Jaf