intel/decoder: Avoid freeing invalid pointer
authorSagar Ghuge <sagar.ghuge@intel.com>
Thu, 6 Sep 2018 19:37:28 +0000 (12:37 -0700)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 4 Oct 2018 09:01:56 +0000 (10:01 +0100)
commitf9c8468c824dd9ceb804b6c9e177b738f8340a26
treeb1fa5a15b77544e8d4a837f38324ed13690fdd0d
parentba3304e7641e5e91b44b14131b4714d0a18c6d58
intel/decoder: Avoid freeing invalid pointer

v2: Free ctx.spec if error while reading genxml (Lionel Landwerlin)

v3: Handle case where genxml is empty (Lionel Landwerlin)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/common/gen_decoder.c