Fix: resource leak in enable-event command

Fix coverity issue 1129187.

Signed-off-by: David Goulet <dgoulet@efficios.com>