summaryrefslogtreecommitdiff
path: root/src/utils/xml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/xml.cpp')
-rw-r--r--src/utils/xml.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp
index e9b2260bf..16888fae4 100644
--- a/src/utils/xml.cpp
+++ b/src/utils/xml.cpp
@@ -49,14 +49,14 @@ static void xmlErrorLogger(void *ctx A_UNUSED, const char *msg A_UNUSED, ...)
static void xmlErrorLogger(void *ctx A_UNUSED, const char *msg, ...)
{
+ if (!msg)
+ return;
+
size_t size = 1024;
const size_t msgSize = strlen(msg);
if (msgSize * 3 > size)
size = msgSize * 3;
- if (!msg)
- return;
-
char* buf = new char[size + 1];
va_list ap;