dnd/session.c: fix memory leak