shithub: riscv

Download patch

ref: e159e8e54a865a2d1eee7543c77c3584e46464be
parent: 45f2fd3c01768f6483e4d583e4ca06c8e11362f4
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Mon Sep 5 14:35:54 EDT 2011

strdup: set malloctag

--- a/sys/src/libc/port/strdup.c
+++ b/sys/src/libc/port/strdup.c
@@ -9,6 +9,6 @@
 	ns = malloc(strlen(s) + 1);
 	if(ns == 0)
 		return 0;
-
+	setmalloctag(ns, getcallerpc(&s));
 	return strcpy(ns, s);
 }
--