- Timestamp:
- Apr 1, 2009 4:13:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r18584 r18606 365 365 { 366 366 LogRel(("NAT: error %lu occured on fetching adapters info\n", ret)); 367 RTMemFree(addresses); 367 368 return -1; 368 369 } … … 384 385 { 385 386 LogRel(("NAT: Can't allocate buffer for DNS entry\n")); 387 RTMemFree(addresses); 386 388 return VERR_NO_MEMORY; 387 389 } … … 402 404 RTUtf16ToUtf8(addr->DnsSuffix, &suffix); 403 405 found = 0; 404 LIST_FOREACH(dd, &pData->dns_domain_list_head, dd_list) 405 { 406 if ( dd->dd_pszDomain != NULL 407 && strcmp(dd->dd_pszDomain, suffix) == 0) 406 LIST_FOREACH(dd, &pData->dns_domain_list_head, dd_list) 407 { 408 if ( dd->dd_pszDomain != NULL 409 && strcmp(dd->dd_pszDomain, suffix) == 0) 408 410 { 409 411 found = 1; 412 RTStrFree(suffix); 410 413 break; 411 414 } 412 415 } 413 if (found == 0) 416 if (found == 0) 414 417 { 415 418 dd = RTMemAllocZ(sizeof(struct dns_domain_entry)); 416 419 if (dd == NULL) 417 420 { 418 LogRel(("NAT: not enought memory\n")); 421 LogRel(("NAT: not enough memory\n")); 422 RTStrFree(suffix); 423 RTMemFree(addresses); 419 424 return VERR_NO_MEMORY; 420 } 425 } 421 426 dd->dd_pszDomain = suffix; 422 427 LogRel(("NAT: adding domain name %s to search list\n", dd->dd_pszDomain)); … … 429 434 addr = addr->Next; 430 435 } 436 RTMemFree(addresses); 431 437 return 0; 432 438 } … … 545 551 LIST_FOREACH(dd, &pData->dns_domain_list_head, dd_list) 546 552 { 547 if( tok != NULL 553 if( tok != NULL 548 554 && strcmp(tok, dd->dd_pszDomain) == 0) 549 555 { … … 558 564 LogRel(("NAT: not enought memory to add domain list\n")); 559 565 return VERR_NO_MEMORY; 560 } 566 } 561 567 dd->dd_pszDomain = RTStrDup(tok); 562 568 LogRel(("NAT: adding domain name %s to search list\n", dd->dd_pszDomain)); … … 589 595 LIST_REMOVE(dd, dd_list); 590 596 if (dd->dd_pszDomain != NULL) 591 RTStrFree(dd->dd_pszDomain); 597 RTStrFree(dd->dd_pszDomain); 592 598 RTMemFree(dd); 593 599 } … … 596 602 LIST_REMOVE(dd, dd_list); 597 603 if (dd->dd_pszDomain != NULL) 598 RTStrFree(dd->dd_pszDomain); 604 RTStrFree(dd->dd_pszDomain); 599 605 RTMemFree(dd); 600 606 }
Note:
See TracChangeset
for help on using the changeset viewer.