Fix memory leak in http end point server test

Change-Id: Idb6d4ac7e15ae46914e095f2b0c2a32a7c6aae24