* src/storage_conf.c: add one missing check in virStoragePoolDefParseDoc

Daniel
This commit is contained in:
Daniel Veillard 2008-09-03 07:12:37 +00:00
parent 10ccfc92f3
commit b419ebc7e9
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Wed Sep 3 09:08:01 CEST 2008 Daniel Veillard <veillard@redhat.com>
* src/storage_conf.c: add one missing check in virStoragePoolDefParseDoc
Tue Sep 2 17:30:50 CEST 2008 Daniel Veillard <veillard@redhat.com> Tue Sep 2 17:30:50 CEST 2008 Daniel Veillard <veillard@redhat.com>
* src/domain_conf.c: fix a parsing error for input devices * src/domain_conf.c: fix a parsing error for input devices

View File

@ -331,6 +331,11 @@ virStoragePoolDefParseDoc(virConnectPtr conn,
if (ret->source.name == NULL) { if (ret->source.name == NULL) {
/* source name defaults to pool name */ /* source name defaults to pool name */
ret->source.name = strdup(ret->name); ret->source.name = strdup(ret->name);
if (ret->source.name == NULL) {
virStorageReportError(conn, VIR_ERR_NO_MEMORY, "%s",
_("pool name"));
goto cleanup;
}
} }
} }