diff options
author | Jim Meyering <meyering@redhat.com> | 2012-07-13 19:20:19 +0200 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-07-13 14:06:34 -0700 |
commit | aabe0c96cac4d219015a2fe085a7f89ebb9744d1 (patch) | |
tree | cbfe5791fb690075907f7c91d10ff9e2a8150208 | |
parent | a732e54aad9cff72097ff3020ef5c15ecd61b388 (diff) |
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 <meyering@redhat.com>
Reviewed-on: http://review.gluster.com/3670
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r-- | cli/src/cli-xml-output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index 4f19400a574..419cae20a16 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; } |