On branch "code-review"... RebootMode is deleted when it is NULL. When it's non-NULL, RebootMode leaks, though this doesn't matter much as the next line is a reset. sizeof(RebootMode) should be sizeof(RebootModeValue).