xenbus_read() and xenbus_write() will allocate memory for error
message if any error occurs, this memory should be freed.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
msg = xenbus_read(t, path, &value);
if (msg) {
printk("xs_read(%s): %s\n", path, msg);
+ free(msg);
return NULL;
}
msg = xenbus_write(t, path, value);
if (msg) {
printk("xs_write(%s): %s\n", path, msg);
+ free(msg);
return false;
}
return true;