提交 489da1c4 编写于 作者: D Daniel P. Berrange

Fix missing check for memory allocation failure

上级 4b234955
Thu May 29 14:44:00 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* src/xend_internal.c: Fix missing check for failure
Thu May 29 11:29:00 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* tests/nodeinfotest.c, tests/qemuxml2argvtest.c,
......
......@@ -924,6 +924,10 @@ char *sound_string_to_xml(const char *sound) {
// and build with all available models
if (STREQ(model, "all")) {
int i;
if (virBufferError(&buf)) {
free(model);
goto error;
}
free(virBufferContentAndReset(&buf));
for (i=0; i < sizeof(sound_models)/sizeof(*sound_models); ++i)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册