Fix coverity warning.
Fix coverity warning.

- Dereferencing a pointer from realloc before checking if it's null.

ultravideo/kvazaar,lu-zero/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,lu-zero/kvazaar,ultravideo/kvazaar,lu-zero/kvazaar,ultravideo/kvazaar,lu-zero/kvazaar