Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-1671

SocketConnect in libcfnet can leak socket descriptors in some circumstances

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.2
    • Component/s: Network
    • Labels:
      None

      Description

      In the case where socket(2) fails, we bind to a specific instance, but bind(2)ing to that interface is unsuccessful, the sd that was operated on never closes.

      <pre>
      if (ap2 == NULL)

      { Log(LOG_LEVEL_ERR, "Unable to bind to interface '%s'. (bind: %s)", BINDINTERFACE, GetErrorStr()); }

      assert(response2); /* second getaddrinfo was successful */
      freeaddrinfo(response2);
      </pre>

      This should include a call to @cf_closesocket@.

        Attachments

          Activity

            People

            • Assignee:
              a10038 jimis (Dimitrios Apostolou)
              Reporter:
              worr William Orr
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel