Jiri Slaby ceec634076 HID: sensor-hub: fix potential memory leak
hsdev is not freed in sensor_hub_probe when kasprintf inside the for
loop fails. This is because hsdev is not set to platform_data yet (to
be freed by the code in the err_no_mem label). So free the memory
explicitly in the 'if' branch, as this is the only place where this is
(and will) be needed.

Reported-by: coverity
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: srinivas pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-06-30 13:21:50 +02:00
..
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-04-24 16:32:27 +02:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00
2013-01-03 10:27:31 +01:00