I.e. allocate memory for the pointer returned when the first
argument is NULL.
(From OE-Core rev: fe148da36af2dc086e05e2ebc1c088f1b5485de2)
Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>