[Bug manual/27866] New: free() missing from sample code

selfy7777 at gmail dot com sourceware-bugzilla@sourceware.org
Fri May 14 16:51:50 GMT 2021


https://sourceware.org/bugzilla/show_bug.cgi?id=27866

            Bug ID: 27866
           Summary: free() missing from sample code
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: manual
          Assignee: unassigned at sourceware dot org
          Reporter: selfy7777 at gmail dot com
                CC: mtk.manpages at gmail dot com
  Target Milestone: ---

Hi, 

here:
https://www.gnu.org/software/libc/manual/html_node/String-Streams.html#String-Streams

in Function: FILE * open_memstream (char **ptr, size_t *sizeloc);

the manual says "After you’ve closed the stream, this buffer is your
responsibility to clean up using free or realloc".

Then below there is some sample code, but no free().

Thank you 
bye bye.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list