From: Jan Beulich Date: Thu, 20 Dec 2012 10:31:11 +0000 (+0000) Subject: xen-blkback: do not leak mode property X-Git-Tag: v3.2.40~75 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b9662bc67d91cf8ce3a7b8f88fa12bbd5eba153;p=pandora-kernel.git xen-blkback: do not leak mode property commit 9d092603cc306ee6edfe917bf9ab8beb5f32d7bc upstream. "be->mode" is obtained from xenbus_read(), which does a kmalloc() for the message body. The short string is never released, so do it along with freeing "be" itself, and make sure the string isn't kept when backend_changed() doesn't complete successfully (which made it desirable to slightly re-structure that function, so that the error cleanup can be done in one place). Reported-by: Olaf Hering Signed-off-by: Jan Beulich Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed