From 2d37d290b735fe583591f07baaf4a69f37f12e08 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 1 Jul 2012 05:37:14 +0200 Subject: [PATCH] Make sure that the internal strdup is used. The kernel strdup will still be used, as the local symbol doesn't override that. Since we must not use strdup from within the kernel debugger (as it does malloc from the normal heap), force the use of the internal strdup that gets redirected to debug_malloc. --- src/add-ons/kernel/debugger/qrencode/split.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/debugger/qrencode/split.c b/src/add-ons/kernel/debugger/qrencode/split.c index f53dce5dc4..cf66d0a177 100644 --- a/src/add-ons/kernel/debugger/qrencode/split.c +++ b/src/add-ons/kernel/debugger/qrencode/split.c @@ -41,7 +41,7 @@ #if !HAVE_STRDUP #undef strdup -char *strdup(const char *s) +char *strdup_internal(const char *s) { size_t len = strlen(s) + 1; void *new = malloc(len); @@ -269,7 +269,7 @@ static char *dupAndToUpper(const char *str, QRencodeMode hint) char *newstr, *p; QRencodeMode mode; - newstr = strdup(str); + newstr = strdup_internal(str); if(newstr == NULL) return NULL; p = newstr;