Changeset 509 for trunk/src


Ignore:
Timestamp:
Aug 9, 2016, 8:06:45 PM (8 years ago)
Author:
katerina
Message:

Fix for ticket #402 (memory leak in server).

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_calls.c

    r503 r509  
    737737  if ((val_return < 0) && (*o_noatime != 0))
    738738    {
     739      /* cppcheck-suppress resourceLeak */
    739740      val_return = open (pathname, flags, mode);
    740741      if (val_return >= 0)
  • trunk/src/sh_ipvx.c

    r481 r509  
    302302      break;
    303303    }
     304  freeaddrinfo(res);
    304305  return 1;
    305306#else
     
    382383  if (err == 0)
    383384    {
     385      struct addrinfo * res_orig = res;
     386
    384387#if defined(AI_CANONNAME)
    385388      if (res->ai_canonname && strlen(res->ai_canonname) > 0)
     
    413416          res = res->ai_next;
    414417        }
     418     
     419      freeaddrinfo(res_orig);
    415420    }
    416421#else
Note: See TracChangeset for help on using the changeset viewer.