[OpenWrt-Devel] [PATCH] Deal gracefully with allocation failures in a few omitted places.
Felix Fietkau
nbd at openwrt.org
Mon Jul 6 17:14:46 EDT 2015
On 2015-06-26 00:21, Juliusz Chroboczek wrote:
> ---
> libubus.c | 3 +++
> ubusd_acl.c | 2 ++
> 2 files changed, 5 insertions(+)
>
> diff --git a/libubus.c b/libubus.c
> index ccaa069..9aae613 100644
> --- a/libubus.c
> +++ b/libubus.c
> @@ -77,6 +77,9 @@ ubus_queue_msg(struct ubus_context *ctx, struct ubus_msghdr_buf *buf)
> void *data;
>
> pending = calloc_a(sizeof(*pending), &data, blob_raw_len(buf->data));
> + if (!pending)
> + /* XXX */
> + return;
Please use tab instead of space for indenting. Also, why XXX here?
- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list