summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-12 03:07:34 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-12 03:07:34 +0000
commit0a2e17d7c76cfab0e1950e50d309e1afab5029ff (patch)
treea0cfa1641ab5bcc5029c5b9d327f387828d78baa /ldso
parentd0af5168658c4ae08258366903d78fa3b44640a6 (diff)
fix a (very unlikely) page leak
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/dl-elf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
index a788f8ebf..241d0222a 100644
--- a/ldso/ldso/dl-elf.c
+++ b/ldso/ldso/dl-elf.c
@@ -698,6 +698,9 @@ void _dl_dprintf(int fd, const char *fmt, ...)
char *start, *ptr, *string;
static char *buf;
+ if (!fmt)
+ return;
+
buf = _dl_mmap((void *) 0, _dl_pagesize, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (_dl_mmap_check_error(buf)) {
@@ -707,9 +710,6 @@ void _dl_dprintf(int fd, const char *fmt, ...)
start = ptr = buf;
- if (!fmt)
- return;
-
if (_dl_strlen(fmt) >= (_dl_pagesize - 1)) {
_dl_write(fd, "overflow\n", 11);
_dl_exit(20);