lilliput
lilliput copied to clipboard
Unreachable code in thumbhash_encoder_create function
The thumbhash_encoder_create
function includes a null-check on the return value from new
; however, if new
were to fail, the default behavior is to throw an std::bad_alloc
exception rather than return null, making the if
-condition unreachable.
https://github.com/discord/lilliput/blob/217a9d5cff47a3310851f1f9239df962c5b2c1bd/thumbhash.cpp#L18-L21