[PATCH] reg: Handle memory allocation failures in run_delete (cppcheck)