On 5/23/23 12:39, Frode Nordahl wrote:
<snip>
> int
> tc_transact(struct ofpbuf *request, struct ofpbuf **replyp)
> {
> int error = nl_transact(NETLINK_ROUTE, request, replyp);
> ofpbuf_uninit(request);
> +
> + if (!error && replyp && !(*replyp)->size) {
Not a full review, but shouldn't we also check that *replyp != NULL
here? This can happen, for example, if nl_pool_alloc() fails.
> + COVERAGE_INC(tc_transact_eagain);
> + /* We replicate the behavior of `nl_transact` for error conditions
> and
> + * free any allocations before setting the 'replyp' buffer to NULL.
> */
> + ofpbuf_delete(*replyp);
> + *replyp = NULL;
> + return EAGAIN;
> + }
> +
> return error;
> }
>
Bets regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev