* Re: Retry: man pages bug in snprintf (3)
[not found] ` <CAF2ooDxfNBV+x=SnWc853fagRuME7QZh1P61prQ_djF-6yRNGw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-12-30 7:52 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; only message in thread
From: Michael Kerrisk (man-pages) @ 2013-12-30 7:52 UTC (permalink / raw)
To: Arif Zaman
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
linux-man-u79uwXL29TY76Z2rM5mHXA
On 11/13/13 10:24, Arif Zaman wrote:
> Sorry, my last message contained html. Here is a plain-text version of the same thing.
>
> In the final example on the man page for snprintf (3),
>
> after the /* check error code */ there should be:
>
> if (n < 0) {
> free(p);
> return NULL;
> }
>
> in order to avoid a memory leak.
>
> This was discussed on http://stackoverflow.com/questions/19933479/snprintf-man-page-example-memory-leak.
Thanks for reporting this. I made the change as you suggest.
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-30 7:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAF2ooDxfNBV+x=SnWc853fagRuME7QZh1P61prQ_djF-6yRNGw@mail.gmail.com>
[not found] ` <CAF2ooDxfNBV+x=SnWc853fagRuME7QZh1P61prQ_djF-6yRNGw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-30 7:52 ` Retry: man pages bug in snprintf (3) Michael Kerrisk (man-pages)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).