1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: dmeventd plugin fix memleak

Fix memory leak when policy command fails too frequently and
plugin decided to skip it.
This commit is contained in:
Zdenek Kabelac 2018-10-15 14:21:55 +02:00
parent fbfbbf6d6a
commit 3222924c3d
2 changed files with 2 additions and 2 deletions

View File

@ -286,7 +286,7 @@ void process_event(struct dm_task *dmt,
if (state->fails++ <= state->max_fails) {
log_debug("Postponing frequently failing policy (%u <= %u).",
state->fails - 1, state->max_fails);
return;
goto out;
}
if (state->max_fails < MAX_FAILS)
state->max_fails <<= 1;

View File

@ -245,7 +245,7 @@ void process_event(struct dm_task *dmt,
if (state->fails++ <= state->max_fails) {
log_debug("Postponing frequently failing policy (%u <= %u).",
state->fails - 1, state->max_fails);
return;
goto out;
}
if (state->max_fails < MAX_FAILS)
state->max_fails <<= 1;