Remove VIR_STRDUP usage that sneaked in in the meantime

My hesitation to remove VIR_STRDUP without VIR_STRNDUP resulted
in these being able to sneak in.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2019-12-11 14:00:27 +01:00
parent 572ce352da
commit 99114a6259
2 changed files with 2 additions and 5 deletions

View File

@ -483,9 +483,7 @@ virDomainBackupAlignDisks(virDomainBackupDefPtr def,
continue;
backupdisk = &def->disks[ndisks++];
if (VIR_STRDUP(backupdisk->name, domdisk->dst) < 0)
return -1;
backupdisk->name = g_strdup(domdisk->dst);
if (backup_all &&
!virStorageSourceIsEmpty(domdisk->src) &&

View File

@ -5564,8 +5564,7 @@ int qemuMonitorJSONGetMachines(qemuMonitorPtr mon,
goto cleanup;
}
if (VIR_STRDUP(info->defaultCPU, tmp) < 0)
goto cleanup;
info->defaultCPU = g_strdup(tmp);
}
}