opkg: Protect add-exclude.patch from malloc failure
authorPaul Barker <paul@paulbarker.me.uk>
Thu, 14 Aug 2014 16:46:51 +0000 (16:46 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 Aug 2014 17:21:50 +0000 (18:21 +0100)
commit03e3ecdc9ae92e47e0a7a5ac942582ec7e0441e8
treea7f45aaef2dcff1c3114929b60fb978681191509
parentc4b95bb5854bd07cae961ddc4a9a4e866c7512d4
opkg: Protect add-exclude.patch from malloc failure

In the code added by add-exclude.patch, the return values of malloc and realloc
were not checked before being dereferenced.

In opkg we can use xmalloc and xrealloc instead of malloc and realloc. These
functions terminate the program instead of returning NULL if memory allocation
fails.

(From OE-Core rev: 64048d45d5c52d354396e357e765f0fd8b5e56fd)

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/opkg/opkg/add-exclude.patch