fix uninitialized var error in aug.c

also fix minor use after free error in
api_test.c