Fix memory leak in dhmon client lib