net/colo-compare.c: Fix memory leak and code style issue.
commitf77bed14f01557596727c4eea042e9818c242049
authorZhang Chen <chen.zhang@intel.com>
Mon, 22 Jul 2019 17:18:28 +0000 (23 01:18 +0800)
committerJason Wang <jasowang@redhat.com>
Mon, 29 Jul 2019 08:29:30 +0000 (29 16:29 +0800)
tree8f3f7117835e41f5422b2250188c091e65cc0e06
parent389abe1dd1790c0de7a2f1f422dcdf778b509a16
net/colo-compare.c: Fix memory leak and code style issue.

This patch to fix the origin "char *data" memory leak, code style issue
and add necessary check here.
Reported-by: Coverity (CID 1402785)
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/colo-compare.c