riched20: Handle more missing allocs gracefully (Coverity).
This commit is contained in:
parent
605a40e477
commit
a09621b00f
|
@ -219,8 +219,10 @@ void RTFInit(RTF_Info *info)
|
||||||
{
|
{
|
||||||
info->rtfTextBuf = heap_alloc (rtfBufSiz);
|
info->rtfTextBuf = heap_alloc (rtfBufSiz);
|
||||||
info->pushedTextBuf = heap_alloc (rtfBufSiz);
|
info->pushedTextBuf = heap_alloc (rtfBufSiz);
|
||||||
if (info->rtfTextBuf == NULL || info->pushedTextBuf == NULL)
|
if (info->rtfTextBuf == NULL || info->pushedTextBuf == NULL) {
|
||||||
ERR ("Cannot allocate text buffers.\n");
|
ERR ("Cannot allocate text buffers.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
info->rtfTextBuf[0] = info->pushedTextBuf[0] = '\0';
|
info->rtfTextBuf[0] = info->pushedTextBuf[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue