This function is going to be used later in such context where the argument makes no sense. Teach this function to cope with that instead of the caller having to deal with passing some dummy argument. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/util/virlease.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virlease.c b/src/util/virlease.c index b8e9d8b..910c003 100644 --- a/src/util/virlease.c +++ b/src/util/virlease.c @@ -120,7 +120,7 @@ virLeaseReadCustomLeaseFile(virJSONValuePtr leases_array_new, continue; } - if (strchr(ip_tmp, ':')) { + if (server_duid && strchr(ip_tmp, ':')) { /* This is an ipv6 lease */ if ((server_duid_tmp = virJSONValueObjectGetString(lease_tmp, "server-duid"))) { -- 2.4.10 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list