Fix for #29: STRNDUP memory leak fix

This commit is contained in:
Theak 2019-12-29 14:09:02 +00:00
parent b92d6a2c82
commit 7efd69ca83
1 changed files with 0 additions and 2 deletions

2
toml.c
View File

@ -2119,8 +2119,6 @@ int toml_rtos(const char* src, char** ret)
/* last char in src must be ' */ /* last char in src must be ' */
if (! (sp <= sq && *sq == '\'')) if (! (sp <= sq && *sq == '\''))
return -1; return -1;
/* copy from sp to p */
*ret = STRNDUP(sp, sq - sp);
} }
*ret = norm_lit_str(sp, sq - sp, *ret = norm_lit_str(sp, sq - sp,