Message ID | 20210310004446.206714-1-blp@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] ovn-northd-ddlog: Fix error checking in ddlog_commit(). | expand |
On Wed, Mar 10, 2021 at 6:15 AM Ben Pfaff <blp@ovn.org> wrote: > > new_delta has the error status but this function was checking a > different variable instead. > > Found by inspection.; > > Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Numan Siddique <numans@ovn.org> Numan > --- > northd/ovn-northd-ddlog.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/northd/ovn-northd-ddlog.c b/northd/ovn-northd-ddlog.c > index 238987410239..81ea8c144a96 100644 > --- a/northd/ovn-northd-ddlog.c > +++ b/northd/ovn-northd-ddlog.c > @@ -320,7 +320,7 @@ static int > ddlog_commit(ddlog_prog ddlog) > { > ddlog_delta *new_delta = ddlog_transaction_commit_dump_changes(ddlog); > - if (!delta) { > + if (!new_delta) { > VLOG_WARN("Transaction commit failed"); > return -1; > } > -- > 2.29.2 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
On Wed, Mar 24, 2021 at 11:52:04AM +0530, Numan Siddique wrote: > On Wed, Mar 10, 2021 at 6:15 AM Ben Pfaff <blp@ovn.org> wrote: > > > > new_delta has the error status but this function was checking a > > different variable instead. > > > > Found by inspection.; > > > > Signed-off-by: Ben Pfaff <blp@ovn.org> > > Acked-by: Numan Siddique <numans@ovn.org> Thanks, applied to master.
diff --git a/northd/ovn-northd-ddlog.c b/northd/ovn-northd-ddlog.c index 238987410239..81ea8c144a96 100644 --- a/northd/ovn-northd-ddlog.c +++ b/northd/ovn-northd-ddlog.c @@ -320,7 +320,7 @@ static int ddlog_commit(ddlog_prog ddlog) { ddlog_delta *new_delta = ddlog_transaction_commit_dump_changes(ddlog); - if (!delta) { + if (!new_delta) { VLOG_WARN("Transaction commit failed"); return -1; }
new_delta has the error status but this function was checking a different variable instead. Found by inspection.; Signed-off-by: Ben Pfaff <blp@ovn.org> --- northd/ovn-northd-ddlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)