Merge pull request #30 from theakman2/issue_29_strndup_memory_leak_fix

Fix for #29: STRNDUP memory leak fix
This commit is contained in:
CK Tan 2019-12-29 11:30:30 -08:00 committed by GitHub
commit 532239d83a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 ' */
if (! (sp <= sq && *sq == '\''))
return -1;
/* copy from sp to p */
*ret = STRNDUP(sp, sq - sp);
}
*ret = norm_lit_str(sp, sq - sp,