free and allocate seem to work

Signed-off-by: Tim Henderson <tim.tadh@gmail.com>