Fix improbable memory leak in _citrus_prop_read_str().

Found by:	Clang Static Analyzer
This commit is contained in:
Pedro F. Giffuni 2015-04-20 22:09:50 +00:00
parent b23cbbe6db
commit 4194e4e371
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281798

View File

@ -293,8 +293,10 @@ done:
}
_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;
}