X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdpif-linux.c;h=75bfc45872fa787c9ce495b1c57bdf6897e7755e;hb=4afba28d559511a5ee03e005b65be8323bf26ad3;hp=6b36ef600ac0e711fbdf8ac666fb532783e024a9;hpb=ddbfda846297ab9e89ed9c3f844a8eff86692275;p=openvswitch diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index 6b36ef60..75bfc458 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -492,7 +492,7 @@ dpif_linux_port_query__(const struct dpif *dpif, uint32_t port_no, /* A query by name reported that 'port_name' is in some datapath * other than 'dpif', but the caller wants to know about 'dpif'. */ error = ENODEV; - } else { + } else if (dpif_port) { dpif_port->name = xstrdup(reply.name); dpif_port->type = xstrdup(netdev_vport_get_netdev_type(&reply)); dpif_port->port_no = reply.port_no;