From aabe0c96cac4d219015a2fe085a7f89ebb9744d1 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 13 Jul 2012 19:20:19 +0200 Subject: cli-xml-output.c: avoid NULL-deref upon OOM Fix typo: s/buf/*buf/ in test after *buf = xmlBufferPtr(... Spotted by coverity. Change-Id: I92cd317832818647009a74f2a8407b5d3ecb958c BUG: 789278 Signed-off-by: Jim Meyering Reviewed-on: http://review.gluster.com/3670 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- cli/src/cli-xml-output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index 4f19400a5..419cae20a 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -45,7 +45,7 @@ cli_begin_xml_output (xmlTextWriterPtr *writer, xmlBufferPtr *buf) int ret = -1; *buf = xmlBufferCreateSize (8192); - if (buf == NULL) { + if (*buf == NULL) { ret = -1; goto out; } -- cgit