htclient.c: forgotten close() calls fixed