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

network: Resolve Coverity FORWARD_NULL

If the VIR_STRDUP(exptime,...) fails, then we will jump to cleanup,
no need to check if exptime is set which causes Coverity to issue
a complaint in the virStrToLong_ll call because there wasn't a check
for a NULL value while there was one for the reference right after
the VIR_STRDUP().
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 f28a31fc
......@@ -180,8 +180,7 @@ main(int argc, char **argv)
goto cleanup;
/* Removed extraneous trailing space in DNSMASQ_LEASE_EXPIRES (dnsmasq < 2.52) */
if (exptime &&
exptime[strlen(exptime) - 1] == ' ')
if (exptime[strlen(exptime) - 1] == ' ')
exptime[strlen(exptime) - 1] = '\0';
/* Check if it is an IPv6 lease */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册