Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1163

Memory leak in zk_hashtable.c:do_insert_watcher_object()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.3
    • 3.3.6, 3.4.4, 3.5.0
    • c client
    • None

    Description

      zk_hashtable.c:do_insert_watcher_object() line number 193 calls add_to_list with clone flag set to 1. This leaks memory, since the original watcher object was already allocated on the heap by activateWatcher() line 330.

      I will upload a patch shortly. The fix is to set clone flag to 0 in the call to add_to_list().

      Attachments

        1. zookeeper-1163.patch
          0.7 kB
          Anupam Chanda

        Activity

          People

            anupamc Anupam Chanda
            anupamc Anupam Chanda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: