mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
phyp: avoid a crash
This has been present since the introduction of phypAttachDevice in commit 444fd07a. * src/phyp/phyp_driver.c (phypAttachDevice): Don't dereference NULL.
This commit is contained in:
parent
34b999be42
commit
0f9e52da82
@ -1720,6 +1720,11 @@ phypAttachDevice(virDomainPtr domain, const char *xml)
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
char *domain_name = NULL;
|
||||
|
||||
if (VIR_ALLOC(def) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
domain_name = escape_specialcharacters(domain->name);
|
||||
|
||||
if (domain_name == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user