* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: context.c,v 1.45.18.4 2007/06/18 03:08:56 marka Exp $ */
+/* $Id: context.c,v 1.45.18.5 2007/06/18 03:30:39 marka Exp $ */
/*! \file context.c
lwres_context_create() creates a #lwres_context_t structure for use in
InitSockets();
#endif
s = socket(domain, SOCK_DGRAM, IPPROTO_UDP);
- if (s < 0)
+ if (s < 0) {
+#ifdef WIN32
+ DestroySockets();
+#endif
return (LWRES_R_IOERROR);
+ }
ret = connect(s, sa, salen);
if (ret != 0) {
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: getipnode.c,v 1.37.18.4 2007/06/18 03:08:56 marka Exp $ */
+/* $Id: getipnode.c,v 1.37.18.5 2007/06/18 03:30:39 marka Exp $ */
/*! \file */
err_ret:
if (buf != NULL)
free(buf);
- if (s != -1) {
+ if (s != -1)
+ close(s);
#ifdef WIN32
- DestroySockets();
+ DestroySockets();
#endif
- close(s);
- }
return (-1);
#endif
}