Buffer release of a buffer that is not available in buffer cache,
caused seg fault, as it was trying to access null pointer

Check for null pointer is added now

Signed-off-by: Satheesaran <satheesaran@gmail.com>