Fix: memory leak in unit test

Fixes coverity issue #1128896

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