avoid leaking memory in traverse_tree (Coverity)
avoid leaking memory in traverse_tree (Coverity)

1033355 Resource leak

gphoto/libgphoto2,gphoto/libgphoto2,gphoto/libgphoto2,gphoto/libgphoto2,gphoto/libgphoto2,gphoto/libgphoto2