From: Daniel Veillard Date: Wed, 3 Sep 2008 07:12:37 +0000 (+0000) Subject: * src/storage_conf.c: add one missing check in virStoragePoolDefParseDoc X-Git-Tag: LIBVIRT_0_4_6~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b419ebc7e99c6c48730867b55a33147951036fd5;p=thirdparty%2Flibvirt.git * src/storage_conf.c: add one missing check in virStoragePoolDefParseDoc Daniel --- diff --git a/ChangeLog b/ChangeLog index b47840623d..8ab308280e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Sep 3 09:08:01 CEST 2008 Daniel Veillard + + * src/storage_conf.c: add one missing check in virStoragePoolDefParseDoc + Tue Sep 2 17:30:50 CEST 2008 Daniel Veillard * src/domain_conf.c: fix a parsing error for input devices diff --git a/src/storage_conf.c b/src/storage_conf.c index 2f6093beb6..dcc1fc2611 100644 --- a/src/storage_conf.c +++ b/src/storage_conf.c @@ -331,6 +331,11 @@ virStoragePoolDefParseDoc(virConnectPtr conn, if (ret->source.name == NULL) { /* source name defaults to pool name */ ret->source.name = strdup(ret->name); + if (ret->source.name == NULL) { + virStorageReportError(conn, VIR_ERR_NO_MEMORY, "%s", + _("pool name")); + goto cleanup; + } } }