Change the --track-fds code to use VG_AR_CORE rather than
VG_(malloc)/(strdup), which puts things into VG_AR_SKIN.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2117 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_mylibc.c b/coregrind/vg_mylibc.c
index 1fe9d97..5931db9 100644
--- a/coregrind/vg_mylibc.c
+++ b/coregrind/vg_mylibc.c
@@ -968,8 +968,15 @@
 __inline__ Char* VG_(arena_strdup) ( ArenaId aid, const Char* s )
 {
    Int   i;
-   Int   len = VG_(strlen)(s) + 1;
-   Char* res = VG_(arena_malloc) (aid, len);
+   Int   len;
+   Char* res;
+
+   if (s == NULL)
+      return NULL;
+
+   len = VG_(strlen)(s) + 1;
+   res = VG_(arena_malloc) (aid, len);
+
    for (i = 0; i < len; i++)
       res[i] = s[i];
    return res;