[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: semi mem leaks
From: |
Dennis Smit |
Subject: |
PATCH: semi mem leaks |
Date: |
Wed, 5 Nov 2003 13:25:59 -0500 (EST) |
These patches are like that i send for users.c so people won't confuse
the leaks for real serious leaks.
wc:
----
--- wc.c 2003-10-18 12:05:47.000000000 +0200
+++ wc_new.c 2003-11-05 19:16:35.000000000 +0100
@@ -674,6 +674,8 @@
max_line_length, _("total"));
}
+ free (fstatus);
+
if (have_read_stdin && close (STDIN_FILENO) != 0)
error (EXIT_FAILURE, errno, "-");
----
who:
----
--- who.c 2003-10-18 12:05:47.000000000 +0200
+++ who_new.c 2003-11-05 19:16:26.000000000 +0100
@@ -605,6 +605,8 @@
list_entries_who (n_users, utmp_buf);
else
scan_entries (n_users, utmp_buf);
+
+ free (utmp_buf);
}
void
----
Changelog addition:
----
src/who:
* src/who.c (who): free utmp_buf (like in users.c).
src/wc:
* src/wc.c (main): free fstatus so there is no confusion about
whether it's leaked or not.
----
- PATCH: semi mem leaks,
Dennis Smit <=