Follow-up Comment #1, bug #68922 (group groff):

commit 6f9e7b255df14431fbda6b13bfd4c5cf4d05619d
Author: G. Branden Robinson <[email protected]>
Date:   Sun Nov 15 18:54:57 2026 -0600

    [pic]: Fix memory leak.
    
    * src/preproc/pic/pic.h: Declare new function `clean_up_parser()`.
    
    * src/preproc/pic/pic.ypp: Preprocessor-include C++ <vector> header
      file.  Declare global `place_list`, an STL vector of pointers to
      `place`.
    
      (define_label, define_variable): Store heap-allocated `place` pointer
      to `place_list`.
    
      (clean_up_parser): New function walks the `place_list` and
      array-deletes the `place` pointers within.
    
    * src/preproc/pic/main.cpp (main): Call `clean_up_parser()` when exiting
      normally.
    
    Begins the long process of fixing Savannah #68922.
    
    Given rudimentary input like:
    
    .PS
    circle 0.1;
    .PE
    
    ...fixes:
    
    ==11850==ERROR: LeakSanitizer: detected memory leaks
    
    Direct leak of 504 byte(s) in 21 object(s) allocated from:
        #0 0x7fc9be4b9628 in operator new[](unsigned long)
../../../../src/libsanitizer/asan/asan_new_delete.cpp:98
        #1 0x55e96fc9e3c1 in define_variable(char const*, double)
../src/preproc/pic/pic.ypp:1840
    
    SUMMARY: AddressSanitizer: 504 byte(s) leaked in 21 allocation(s).




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68922>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to