From 09fc3a65d9ef72493b8d0c549c8f056d30db8728 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 9 Dec 2009 18:50:49 +0000 Subject: Fix a memory leak in hotplug2 environment handling. Bump hotplug2 to the latest svn revision, remove obsolete patches. Memory leak is caused by the way hotplug2 handles environment variables, using setenv() and unsetenv(). setenv() creates copies of the supplied strings, but, due to a POSIX blunder, these copies are never destroyed by unsetenv(), neither in glibc nor uclibc - not until the program terminates. Since some events are handled directly in the main process, even when configured with the "fork" worker, hotplug2 memory usage will keep growing over time. This can be observed by running "udevtrigger" and noting the increase in hotplug2 VmRSS after each run. This patch uses putenv() instead, which leaves storage management to the caller, so that we can explicitly delete stuff when it's no longer needed. Signed-off-by: Aleksandar Radovanovic git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18725 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/hotplug2/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package/hotplug2/Makefile') diff --git a/package/hotplug2/Makefile b/package/hotplug2/Makefile index b51e5a97f..2f8fc1477 100644 --- a/package/hotplug2/Makefile +++ b/package/hotplug2/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hotplug2 -PKG_REV:=199 +PKG_REV:=201 PKG_VERSION:=$(PKG_REV) PKG_RELEASE:=1 -- cgit v1.2.3