mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
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: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
f28a31fcc4
commit
d3f0708e84
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user