aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0062-free-allocations-in-clearenv.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/musl/0062-free-allocations-in-clearenv.patch')
-rw-r--r--main/musl/0062-free-allocations-in-clearenv.patch36
1 files changed, 0 insertions, 36 deletions
diff --git a/main/musl/0062-free-allocations-in-clearenv.patch b/main/musl/0062-free-allocations-in-clearenv.patch
deleted file mode 100644
index a5bb4bca00..0000000000
--- a/main/musl/0062-free-allocations-in-clearenv.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From cc0dbd5f09337c187156fe8b697245e6ea9263d0 Mon Sep 17 00:00:00 2001
-From: Alexander Monakov <amonakov@ispras.ru>
-Date: Sun, 3 Sep 2017 22:12:21 +0300
-Subject: free allocations in clearenv
-
-This aligns clearenv with the Linux man page by setting 'environ'
-rather than '*environ' to NULL, and stops it from leaking entries
-allocated by the libc.
----
- src/env/clearenv.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/src/env/clearenv.c b/src/env/clearenv.c
-index 62d5095..da18775 100644
---- a/src/env/clearenv.c
-+++ b/src/env/clearenv.c
-@@ -1,10 +1,14 @@
- #define _GNU_SOURCE
- #include <stdlib.h>
-+#include "libc.h"
-
--extern char **__environ;
-+static void dummy(char *old, char *new) {}
-+weak_alias(dummy, __env_rm_add);
-
- int clearenv()
- {
-- __environ[0] = 0;
-+ char **e = __environ;
-+ __environ = 0;
-+ if (e) while (*e) __env_rm_add(*e++, 0);
- return 0;
- }
---
-cgit v0.11.2
-