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.
This commit is contained in:
Michael Lotz
2012-07-01 06:37:26 +02:00
parent fcc4ecb0c7
commit 2d37d290b7
+2 -2
View File
@@ -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;