Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak cache set item #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions c/src/core/client/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ in3_ret_t in3_plugin_register(
/** registers a plugin and uses the function name as plugin name */
#define plugin_register(c, acts, action_fn, data, replace_ex) in3_plugin_register(#action_fn, c, acts, action_fn, data, replace_ex)
/**
* adds a plugin rregister function to the default. All defaults functions will automaticly called and registered for every new in3_t instance.
* adds a plugin rregister function to the default. All defaults functions will automatically called and registered for every new in3_t instance.
*/
void in3_register_default(plgn_register reg_fn);

Expand All @@ -85,7 +85,7 @@ in3_ret_t in3_plugin_execute_first_or_none(in3_ctx_t* ctx, in3_plugin_act_t acti
// ----------- RPC HANDLE -----------

/**
* verification context holding the pointers to all relevant toknes.
* verification context holding the pointers to all relevant tokens.
*/
typedef struct {
in3_ctx_t* ctx; /**< Request context. */
Expand Down
2 changes: 1 addition & 1 deletion python/in3/libin3/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def set_item(_cptr, key, value):
key: File name to be stored.
value: File contents.
"""
key = c.string_at(key).decode('utf8')
key = c.string_at(key, c.sizeof(key)).decode('utf8')
path.mkdir(parents=True, exist_ok=True)
try:
value = c.string_at(value.contents.data, value.contents.len)
Expand Down