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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user