From: Ben Pfaff Date: Thu, 15 Mar 2012 21:06:54 +0000 (-0700) Subject: meta-flow: Don't dereference NULL sf->field in mf_format_subfield(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33500edd53fd76a304766812fd0829e7f3ab222f;p=openvswitch meta-flow: Don't dereference NULL sf->field in mf_format_subfield(). Signed-off-by: Ben Pfaff --- diff --git a/lib/meta-flow.c b/lib/meta-flow.c index c12a9097..11d27b15 100644 --- a/lib/meta-flow.c +++ b/lib/meta-flow.c @@ -2343,7 +2343,7 @@ mf_format_subfield(const struct mf_subfield *sf, struct ds *s) ds_put_cstr(s, sf->field->name); } - if (sf->ofs == 0 && sf->n_bits == sf->field->n_bits) { + if (sf->field && sf->ofs == 0 && sf->n_bits == sf->field->n_bits) { ds_put_cstr(s, "[]"); } else if (sf->n_bits == 1) { ds_put_format(s, "[%d]", sf->ofs);