gweb: Check GString pointers before freeing them