blame the caller for the memory allocated by strdup. Reference: /n/sources/patch/applied/strduptag Date: Mon Jul 7 17:38:21 CES 2008 Signed-off-by: quanstro@quanstro.net --- /sys/src/libc/port/strdup.c Mon Jul 7 17:37:53 2008 +++ /sys/src/libc/port/strdup.c Mon Jul 7 17:37:52 2008 @@ -9,6 +9,6 @@ ns = malloc(strlen(s) + 1); if(ns == 0) return 0; - + setmalloctag(ns, getcallerpc(&s)); return strcpy(ns, s); }