[PATCH v2 1/2] setupapi: Handle NULL in string allocation functions and add tests.