Menu

#2975 memoryleak from pcre

Future
open
nobody
5
2013-03-02
2010-09-12
Matthias
No

with new version I get a memoryleak
pcre_study() alloc memory, what never has set free again aslong there was no errormessage

Discussion

  • Matthias

    Matthias - 2010-09-12

    memoryleak pcre

     
  • Kimmo Varis

    Kimmo Varis - 2010-09-13

    You are doing the free call in branch where the object to free is already NULL.

     
  • Matthias

    Matthias - 2010-09-13

    NO!
    if (pe != NULL && errormsg != NULL)
    elem->pRegExpExtra = pe;
    else
    pcre_free(pe);

     
  • Matthias

    Matthias - 2010-09-13

    sorry too fast
    pe ist not NULL but errormsg is NULL
    so pcre_free(pe);
    is needed!

     
  • Matthias

    Matthias - 2010-09-17

    did xyou check the addresses?
    I noted that, and compare with the leak infos.
    All same.
    After free() all gone.
    PS it is emogh just to start and exit Winmerge.

     
  • Jochen Tucht

    Jochen Tucht - 2011-03-28

    The (errormsg != NULL) should rather read (errormsg == NULL).

     
  • Kimmo Varis

    Kimmo Varis - 2011-04-07

    In both cases? Care to commit the fix?

     
  • Christian List

    Christian List - 2013-03-02
    • milestone: Trunk --> Future
     

Log in to post a comment.