summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_out.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_out.c')
-rw-r--r--sapi/phpdbg/phpdbg_out.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sapi/phpdbg/phpdbg_out.c b/sapi/phpdbg/phpdbg_out.c
index 6959077d47..0eead04495 100644
--- a/sapi/phpdbg/phpdbg_out.c
+++ b/sapi/phpdbg/phpdbg_out.c
@@ -861,11 +861,10 @@ PHPDBG_API int phpdbg_xml_vasprintf(char **buf, const char *format, zend_bool es
*buf = NULL;
if (cc >= 0) {
- if ((*buf = emalloc(++cc)) != NULL) {
- if ((cc = phpdbg_xml_vsnprintf(*buf, cc, format, escape_xml, ap)) < 0) {
- efree(*buf);
- *buf = NULL;
- }
+ *buf = emalloc(++cc);
+ if ((cc = phpdbg_xml_vsnprintf(*buf, cc, format, escape_xml, ap)) < 0) {
+ efree(*buf);
+ *buf = NULL;
}
}