提交 f099726c 编写于 作者: J John Ferlan

virnetdev: Resolve Coverity FORWARD_NULL

The complaint is that if cleanup is called when virFileReadAll fails,
then mcast->entries is NULL and could be dereferenced in the clear
function. After following the code some - I saw that the caller to
the function (virNetDevGetMulticastTable) will also call
virNetDevMcastListClear if this function returns -1, so this
isn't necessary, so I removed the call.
上级 764deecb
......@@ -2200,9 +2200,6 @@ static int virNetDevGetMcastList(const char *ifname,
ret = 0;
cleanup:
if (ret < 0)
virNetDevMcastListClear(mcast);
VIR_FREE(entry);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册