提交 83b85e3e 编写于 作者: A Alex Jia

util: Prevent libvirtd crash from virNetDevOpenvswitchAddPort()

* src/util/virnetdevopenvswitch.c (virNetDevOpenvswitchAddPort): avoid libvirtd
crash due to derefing a NULL virtVlan->tag.

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=852383Signed-off-by: NAlex Jia <ajia@redhat.com>
上级 6fd1708f
......@@ -99,7 +99,7 @@ int virNetDevOpenvswitchAddPort(const char *brname, const char *ifname,
virBufferAddLit(buf, ",");
virBufferAsprintf(buf, "%d", virtVlan->tag[i]);
}
} else {
} else if (virtVlan->nTags) {
virBufferAsprintf(buf, "tag=%d", virtVlan->tag[0]);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册