lz4: fix CID 1339837: Null pointer dereference
This commit is contained in:
parent
d558930d01
commit
04089d1e11
|
@ -1078,6 +1078,7 @@ typedef struct
|
||||||
void* LZ4_createStreamDecode()
|
void* LZ4_createStreamDecode()
|
||||||
{
|
{
|
||||||
void* lz4s = ALLOCATOR(sizeof(U32), LZ4_STREAMDECODESIZE_U32);
|
void* lz4s = ALLOCATOR(sizeof(U32), LZ4_STREAMDECODESIZE_U32);
|
||||||
|
if (!lz4s) return NULL;
|
||||||
MEM_INIT(lz4s, 0, LZ4_STREAMDECODESIZE);
|
MEM_INIT(lz4s, 0, LZ4_STREAMDECODESIZE);
|
||||||
return lz4s;
|
return lz4s;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue