Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
d942e12a
Commit
d942e12a
authored
Feb 28, 1999
by
Andreas Schwab
Browse files
(main) [DOUG_LEA_MALLOC]: Don't use unsetenv, it calls
malloc in glibc 2.1.
parent
fcdc4d67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
src/emacs.c
src/emacs.c
+13
-2
No files found.
src/emacs.c
View file @
d942e12a
...
...
@@ -571,8 +571,19 @@ main (argc, argv, envp)
if
(
!
malloc_using_checking
)
/* Work around a bug in glibc's malloc. MALLOC_CHECK_ must be
ignored if the heap to be restored was constructed without
malloc checking. */
unsetenv
(
"MALLOC_CHECK_"
);
malloc checking. Can't use unsetenv, since that calls malloc. */
{
char
**
p
;
for
(
p
=
envp
;
*
p
;
p
++
)
if
(
strncmp
(
*
p
,
"MALLOC_CHECK_="
,
14
)
==
0
)
{
do
*
p
=
p
[
1
];
while
(
*++
p
);
break
;
}
}
malloc_set_state
(
malloc_state_ptr
);
free
(
malloc_state_ptr
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment