[patch] applied: strduptag

0 views
Skip to first unread message

9cha...@cat-v.org

unread,
Jul 7, 2008, 7:50:29 PM7/7/08
to plan9c...@googlegroups.com
Created Jul 7 17:50 by none
Processed Jul 7 23:50 by geoff

blame the caller for the memory allocated by
strdup.

--
/sys/src/libc/port/strdup.c
strdup.c.orig:9,14 - /n/sources/patch/applied/strduptag/strdup.c:9,14
ns = malloc(strlen(s) + 1);
if(ns == 0)
return 0;
-
+ setmalloctag(ns, getcallerpc(&s));
return strcpy(ns, s);
}

Reply all
Reply to author
Forward
0 new messages