Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1801

mhash_free have memory leak

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • VPPInfra
    • None

       

      mhash_free not free key_tmps;but in the mhash_init fuction have free key_tmps

      { int i; for (i = 0; i < vec_len (h->key_tmps); i++) vec_free (h->key_tmps[i]); }

      vec_free (h->key_tmps);

      I thinks the key_tmps memory will leak.

       

      always_inline void
      mhash_free (mhash_t * h)
      {
      if (mhash_key_vector_is_heap (h))
      heap_free (h->key_vector_or_heap);
      else
      vec_free (h->key_vector_or_heap);
      vec_free (h->key_vector_free_indices);
      hash_free (h->hash);
      }

            jinshaohui jinshaohui jinshaohui
            jinshaohui jinshaohui jinshaohui
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: