Project

General

Profile

Bug #4956 » 0001-string.c-tr_s_bang-fix-leak-with-heap-strings.patch

normalperson (Eric Wong), 07/01/2011 11:21 AM

View differences:

string.c
CHECK_IF_ASCII(c);
t += tlen;
}
if (!STR_EMBED_P(str)) {
xfree(RSTRING(str)->as.heap.ptr);
}
*t = '\0';
RSTRING(str)->as.heap.ptr = buf;
RSTRING(str)->as.heap.len = t - buf;
(1-1/3)