#548 Memory leak in regcomp

closed-accepted
BZFlag (297)
5
2012-06-08
2012-06-05
Nathan M
No

Valgrind reports a memory leak in MessageOfTheDay::finalization because a regular expression is being compiled multiple times, but freed only once. The attached patch fixes this problem.

Discussion

  • Nathan M
    Nathan M
    2012-06-05

    Frees memory associated with regex_t

     
    Attachments
  • Nathan M
    Nathan M
    2012-06-05

    This valgrind report shows regcomp() leaks at the end.

     
  • Nathan M
    Nathan M
    2012-06-07

    • assigned_to: nobody --> dtremenak
     
  • Nathan M
    Nathan M
    2012-06-07

    Assigning to dtremenak, since 'svn blame' shows that you have done the regex stuff in the MessageOfTheDay class.

     
  • Daniel Remenak
    Daniel Remenak
    2012-06-08

    Accepted as SVN r22480.

     
  • Daniel Remenak
    Daniel Remenak
    2012-06-08

    • status: open --> closed-accepted