Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/in_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ json_fixed_string (Bit_Chain *restrict dat, const int len,
l, &dat->chain[t->start]);
// len = t->end - t->start;
free (str);
str = NULL;
goto normal;
}
str = (char *)realloc (str, dlen);
Expand All @@ -485,6 +486,7 @@ json_fixed_string (Bit_Chain *restrict dat, const int len,
{
char *p;
normal:
if (!str) return NULL;
if (l > len)
{
memcpy (str, &dat->chain[t->start], len);
Expand Down Expand Up @@ -3873,6 +3875,7 @@ json_R2004_Header (Bit_Chain *restrict dat, Dwg_Data *restrict dwg,
}
LOG_TRACE ("file_ID_string: \"%.*s\"\n", 12, _obj->file_ID_string)
free (s);
s = NULL;
}
else if (strEQc (key, "padding"))
{
Expand Down
Loading