mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
make sure to use dc_str_unref instead of free
on cstrings returned/owned by rust
This commit is contained in:
@@ -3180,7 +3180,7 @@ static void call_accounts_js_event_handler(napi_env env, napi_value js_callback,
|
||||
if (status != napi_ok) {
|
||||
napi_throw_error(env, NULL, "Unable to create argv[3] for event_handler arguments");
|
||||
}
|
||||
free(data2_string);
|
||||
dc_str_unref(data2_string);
|
||||
} else {
|
||||
status = napi_create_int32(env, dc_event_get_data2_int(dc_event), &argv[3]);
|
||||
if (status != napi_ok) {
|
||||
@@ -3294,7 +3294,7 @@ static void call_accounts_js_jsonrpc_handler(napi_env env, napi_value js_callbac
|
||||
if (status != napi_ok) {
|
||||
napi_throw_error(env, NULL, "Unable to create argv for js jsonrpc_handler arguments");
|
||||
}
|
||||
free(response);
|
||||
dc_str_unref(response);
|
||||
|
||||
TRACE("calling back into js");
|
||||
napi_value result;
|
||||
|
||||
Reference in New Issue
Block a user