fix error checking of asprintf
authorFrank Meerkötter <frank@meerkoetter.org>
Mon, 3 Dec 2012 18:29:16 +0000 (19:29 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 3 Dec 2012 18:46:37 +0000 (19:46 +0100)
commita02432a5ecbb588964a1800122a213822da96f3c
treeef328c7fca26c47a611c964393488aaea6d32c2f
parentc9242aed7daac67b338f6792b06afe78ffc57011
fix error checking of asprintf

see man asprintf
  [...]
  RETURN VALUE
   When  successful, these  functions return the number of bytes printed, just like sprintf(3).
   If memory allocation wasn't possible, or some other error occurs, these functions will return -1,
   and the contents of strp is undefined.

Signed-off-by: Frank Meerkötter <frank@meerkoetter.org>
ubus.c