Clean up properly when adding a signal handler fails. Previously, when a signation() or signal() call failed, we would free the element we added to sh_old, but not actually clear the pointer. This would leave a dangling pointer in sh_old that could cause a crash later.