follow-up 2: follow the conventional approach

This commit is contained in:
nhmall
2022-06-30 13:15:58 -04:00
parent 4a0654c708
commit 6920632df0

View File

@@ -42,7 +42,7 @@ extern "C" {
const char *regex_error_desc(struct nhregex *re) {
if (re->err) {
if (cppregex_static_buffer != 0)
free(cppregex_static_buffer);
free((genericptr_t) cppregex_static_buffer);
cppregex_static_buffer = dupstr(re->err->what());
return cppregex_static_buffer;
} else