[PATCH 6/8] ul.c: close files and free memory after usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 text-utils/ul.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/text-utils/ul.c b/text-utils/ul.c
index bf467e2..683acdb 100644
--- a/text-utils/ul.c
+++ b/text-utils/ul.c
@@ -226,10 +226,12 @@ int main(int argc, char **argv)
 				err(EXIT_FAILURE, _("%s: open failed"),
 				    argv[optind]);
 			filter(f);
+			fclose(f);
 		}
 	if (ferror(stdout) || fclose(stdout))
 		return EXIT_FAILURE;
 
+	free(obuf);
 	return EXIT_SUCCESS;
 }
 
-- 
1.7.5

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux