Merge pull request #30 from theakman2/issue_29_strndup_memory_leak_fix
Fix for #29: STRNDUP memory leak fix
This commit is contained in:
commit
532239d83a
2
toml.c
2
toml.c
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue