apps/s_socket.c:311: error: USE_AFTER_FREE
  accessing memory that was invalidated by call to `free()` on line 311.
Showing all 6 steps of the trace


apps/s_socket.c:305:7: invalidation part of the trace starts here
303.   	for (;;)
304.   		{
305.   		if (do_accept(accept_socket,&sock,&name) == 0)
             ^
306.   			{
307.   			SHUTDOWN(accept_socket);

apps/s_socket.c:305:7: variable `name` accessed here
  303.   	for (;;)
  304.   		{
  305.   		if (do_accept(accept_socket,&sock,&name) == 0)
               ^
  306.   			{
  307.   			SHUTDOWN(accept_socket);

apps/s_socket.c:311:21: was invalidated by call to `free()`
  309.   			}
  310.   		i=(*cb)(name,sock, context);
  311.   		if (name != NULL) Free(name);
                             ^
  312.   		SHUTDOWN2(sock);
  313.   		if (i < 0)

apps/s_socket.c:305:7: use-after-lifetime part of the trace starts here
303.   	for (;;)
304.   		{
305.   		if (do_accept(accept_socket,&sock,&name) == 0)
             ^
306.   			{
307.   			SHUTDOWN(accept_socket);

apps/s_socket.c:305:7: variable `name` accessed here
  303.   	for (;;)
  304.   		{
  305.   		if (do_accept(accept_socket,&sock,&name) == 0)
               ^
  306.   			{
  307.   			SHUTDOWN(accept_socket);

apps/s_socket.c:311:21: invalid access occurs here
  309.   			}
  310.   		i=(*cb)(name,sock, context);
  311.   		if (name != NULL) Free(name);
                             ^
  312.   		SHUTDOWN2(sock);
  313.   		if (i < 0)
