* [PATCH] getline.3: fix memory leak in example
@ 2014-08-01 17:07 Rahul Bedarkar
[not found] ` <1406912855-8085-1-git-send-email-rahulbedarkar89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Rahul Bedarkar @ 2014-08-01 17:07 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, Rahul Bedarkar
close opened file at the end
Signed-off-by: Rahul Bedarkar <rahulbedarkar89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
man3/getline.3 | 1 +
1 file changed, 1 insertion(+)
diff --git a/man3/getline.3 b/man3/getline.3
index c0b77d3..4b9c452 100644
--- a/man3/getline.3
+++ b/man3/getline.3
@@ -167,6 +167,7 @@ main(void)
}
free(line);
+ 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] getline.3: fix memory leak in example
[not found] ` <1406912855-8085-1-git-send-email-rahulbedarkar89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-08-01 19:56 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2014-08-01 19:56 UTC (permalink / raw)
To: Rahul Bedarkar
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
linux-man-u79uwXL29TY76Z2rM5mHXA
On 08/01/2014 07:07 PM, Rahul Bedarkar wrote:
> close opened file at the end
Applied. Thanks!
Cheers,
Michael
> Signed-off-by: Rahul Bedarkar <rahulbedarkar89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> man3/getline.3 | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/man3/getline.3 b/man3/getline.3
> index c0b77d3..4b9c452 100644
> --- a/man3/getline.3
> +++ b/man3/getline.3
> @@ -167,6 +167,7 @@ main(void)
> }
>
> free(line);
> + fclose(fp);
> exit(EXIT_SUCCESS);
> }
> .fi
>
--
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] 2+ messages in thread
end of thread, other threads:[~2014-08-01 19:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01 17:07 [PATCH] getline.3: fix memory leak in example Rahul Bedarkar
[not found] ` <1406912855-8085-1-git-send-email-rahulbedarkar89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-01 19:56 ` 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).