Message ID | 1474333275-21202-1-git-send-email-jpettit@ovn.org |
---|---|
State | Accepted |
Headers | show |
On Mon, Sep 19, 2016 at 06:01:15PM -0700, Justin Pettit wrote: > The code dereferences "chassis", which could be null if chassis_run() > returns null. "chassis" will always be null if "chassis_id" is null, so > checking "chassis" is sufficient to check both. > > Found by inspection. > > Signed-off-by: Justin Pettit <jpettit@ovn.org> Thanks. Acked-by: Ben Pfaff <blp@ovn.org>
> On Sep 20, 2016, at 10:00 AM, Ben Pfaff <blp@ovn.org> wrote: > > On Mon, Sep 19, 2016 at 06:01:15PM -0700, Justin Pettit wrote: >> The code dereferences "chassis", which could be null if chassis_run() >> returns null. "chassis" will always be null if "chassis_id" is null, so >> checking "chassis" is sufficient to check both. >> >> Found by inspection. >> >> Signed-off-by: Justin Pettit <jpettit@ovn.org> > > Thanks. > > Acked-by: Ben Pfaff <blp@ovn.org> Thanks. I pushed it to master and branch-2.6. --Justin
diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn-controller.c index 5f2f90a..49821f7 100644 --- a/ovn/controller/ovn-controller.c +++ b/ovn/controller/ovn-controller.c @@ -427,7 +427,7 @@ main(int argc, char *argv[]) &all_lports); } - if (br_int && chassis_id) { + if (br_int && chassis) { patch_run(&ctx, br_int, chassis_id, &local_datapaths, &patched_datapaths);
The code dereferences "chassis", which could be null if chassis_run() returns null. "chassis" will always be null if "chassis_id" is null, so checking "chassis" is sufficient to check both. Found by inspection. Signed-off-by: Justin Pettit <jpettit@ovn.org> --- ovn/controller/ovn-controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)