[PATCH] reg: Remove redundant NULL check before heap_free()