public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Rahul Bedarkar <rahulbedarkar89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Rahul Bedarkar
	<rahulbedarkar89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH] core.5: fix memory leak in example
Date: Sat,  2 Aug 2014 15:32:57 +0530	[thread overview]
Message-ID: <1406973777-3078-1-git-send-email-rahulbedarkar89@gmail.com> (raw)

close opened file at the end

Signed-off-by: Rahul Bedarkar <rahulbedarkar89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 man5/core.5 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/man5/core.5 b/man5/core.5
index 074add6..f2c3e36 100644
--- a/man5/core.5
+++ b/man5/core.5
@@ -422,6 +422,7 @@ main(int argc, char *argv[])
         tot += nread;
     fprintf(fp, "Total bytes in core dump: %d\\n", tot);
 
+    fclose(fp);
     exit(EXIT_SUCCESS);
 }
 .fi
-- 
1.8.3.2

--
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:[~2014-08-02 10:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-02 10:02 Rahul Bedarkar [this message]
     [not found] ` <1406973777-3078-1-git-send-email-rahulbedarkar89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-15 18:56   ` [PATCH] core.5: fix memory leak in example Michael Kerrisk (man-pages)

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=1406973777-3078-1-git-send-email-rahulbedarkar89@gmail.com \
    --to=rahulbedarkar89-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox