[PATCH openEuler-1.0-LTS v4 284/292] node: fix device cleanups in error handling code