Commit cc5df0ef authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Fix memory leak when discarding labels

The struct vcl and the temperature rwlock were not free'd on
discarding labels.
parent b18dd05d
......@@ -912,6 +912,8 @@ vcl_cli_discard(struct cli *cli, const char * const *av, void *priv)
if (!strcmp(vcl->state, VCL_TEMP_LABEL)) {
VTAILQ_REMOVE(&vcl_head, vcl, list);
free(vcl->loaded_name);
AZ(errno=pthread_rwlock_destroy(&vcl->temp_rwl));
FREE_OBJ(vcl);
} else if (vcl->temp == VCL_TEMP_COLD)
VCL_Poll();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment