All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Arif Zaman <arifz-fYzJem42smjeSsnKWxLhYw@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Retry: man pages bug in snprintf (3)
Date: Mon, 30 Dec 2013 20:52:17 +1300	[thread overview]
Message-ID: <52C12631.8080209@gmail.com> (raw)
In-Reply-To: <CAF2ooDxfNBV+x=SnWc853fagRuME7QZh1P61prQ_djF-6yRNGw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

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

           reply	other threads:[~2013-12-30  7:52 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CAF2ooDxfNBV+x=SnWc853fagRuME7QZh1P61prQ_djF-6yRNGw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52C12631.8080209@gmail.com \
    --to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=arifz-fYzJem42smjeSsnKWxLhYw@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.