shithub: riscv

Download patch

ref: 13dbaaaf707804db47c9bf29ed93953405672984
parent: ea81146c1515a35481103388a0e1e37aecab4933
author: cinap_lenrek <[email protected]>
date: Fri Jan 25 09:15:48 EST 2013

libc: set malloctag for runestrdup()

--- a/sys/src/libc/port/runestrdup.c
+++ b/sys/src/libc/port/runestrdup.c
@@ -9,6 +9,6 @@
 	ns = malloc(sizeof(Rune)*(runestrlen(s) + 1));
 	if(ns == 0)
 		return 0;
-
+	setmalloctag(ns, getcallerpc(&s));
 	return runestrcpy(ns, s);
 }