Fix improbable memory leak in _citrus_prop_read_str().
Found by: Clang Static Analyzer
This commit is contained in:
parent
b23cbbe6db
commit
4194e4e371
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281798
@ -293,8 +293,10 @@ _citrus_prop_read_str(struct _memstream * __restrict ms,
|
||||
}
|
||||
_memstream_ungetc(ms, ch);
|
||||
errnum = _citrus_prop_read_character_common(ms, &ch);
|
||||
if (errnum != 0)
|
||||
if (errnum != 0) {
|
||||
free(s);
|
||||
return (errnum);
|
||||
}
|
||||
s[n] = ch;
|
||||
++n, --m;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user