libusbgx: Do not try to dereference func when it is NULL. CID#56127
authorPhilippe De Swert <philippe.deswert@jollamobile.com>
Fri, 9 May 2014 12:08:41 +0000 (15:08 +0300)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 22 Dec 2015 19:39:15 +0000 (20:39 +0100)
commit6f4e2b6d25892f5c353e1d24ca198987a209e5dc
treee6e07d8d1c68257950605b8e71b0469bde72861e
parent9372e6aef58eca36e5e1127f33045eec090876a3
libusbgx: Do not try to dereference func when it is NULL. CID#56127

We check if func is NULL, so if the allocation function failed we should
not dereference or handle it anymore, so we jump straight to the end.

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
[Port from libusbg and update description]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
src/usbg.c