Menu

pocketsphinx set_search_internal memory leak

Help
2015-04-22
2015-04-27
  • Sean Robertson

    Sean Robertson - 2015-04-22

    Hi all,

    I'm compiling and running pocketsphinx r12947. I'm running valgrind on my application and I think I found a small memory leak, though I'm not entirely sure. Consider pocketsphinx.c:551

    old_search = (ps_search_t *) hash_table_replace(ps->searches, ckd_salloc(name), search);
    

    I think that when the hash table replaces the search, the old_search name is not freed (it is merely replaced).

    Please let me know if this is the case. Otherwise there's a problem with my code.

    Thanks,
    Sean

     
    • Nickolay V. Shmyrev

      Thank you very much for the report Sean. I fixed this issue in trunk. Please update.

       
  • Sean Robertson

    Sean Robertson - 2015-04-27

    Looks good. Thank you!

     

Log in to post a comment.