fix resource leaks in active-response.c

* fixed resource leaks (found by cppcheck)