Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
hooks: don't leak recorder not being found warning
Browse files Browse the repository at this point in the history
  • Loading branch information
atmaxinger committed Apr 13, 2023
1 parent 69126d7 commit 0d50bb2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/libs/elektra/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,13 @@ int initHooks (KDB * kdb, const KeySet * config, KeySet * modules, const KeySet

// No need for error handling here
// If the plugin does not exist, recording functionality will not be used
initHooksRecord (kdb, loadPlugin ("recorder", kdb->global, modules, contract, errorKey), errorKey);
Key * recordErrorKey = keyDup (errorKey, KEY_CP_ALL);
Plugin * recorderPlugin = loadPlugin ("recorder", kdb->global, modules, contract, errorKey);
if (recorderPlugin != NULL)
{
initHooksRecord (kdb, recorderPlugin, errorKey);
}
keyDel (recordErrorKey);

if (!existingError)
{
Expand Down

0 comments on commit 0d50bb2

Please sign in to comment.