core.5: fix memory leak in example
PATCH 1/1 core.5: fix memory leak in example
close opened file at the end
Signed-off-by Rahul Bedarkar <[email protected]>
--- man5/core.5 | 1 + 1 file changed, 1 insertion(+)
man5/core.5 +1 -0
@@ -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
Signature · 6 lines
1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1406973777-3078-1-git-send-email-rahulbedarkar89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 1 line · Rahul Bedarkar
close opened file at the end
Thanks, Rahul. Applied.
Cheers,
Michael
Quoted 18 lines
Signed-off-by Rahul Bedarkar <[email protected]>--- man5/core.5 | 1 + 1 file changed, 1 insertion(+)man5/core.5 +1
-0@@ -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
Signature · 7 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html