PATCH: getaddrinfo

Juan Lang juan_lang at yahoo.com
Thu Nov 10 16:20:15 CST 2005


Hi Marcus, some small comments:

+    if (nodename) {
+        if (!(nodename = strdup_lower(nodename))) return
WSA_NOT_ENOUGH_MEMORY;
+        node_lowered = TRUE;
+    }
+    
+    if (servname) {
+        if (!(servname = strdup_lower(servname))) return
WSA_NOT_ENOUGH_MEMORY;

You leak nodename in this case.

+    	while (xuai) {
+	    struct WS_addrinfo *ai =
HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY, sizeof(struct WS_addrinfo));
+	    int len;
+
+	    if (!ai) return WSA_NOT_ENOUGH_MEMORY;

In this case, you have the potential of leaking some memory.  Both cases
are dealing with an out of memory condition anyway, so perhaps it's not
that critical.

--Juan


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com



More information about the wine-devel mailing list