Fix for #29: STRNDUP memory leak fix
This commit is contained in:
parent
b92d6a2c82
commit
7efd69ca83
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