Whamcloud - gitweb
LU-4134 obdclass: fix double free in failure path 67/29967/8
authorYang Sheng <yang.sheng@intel.com>
Mon, 27 Nov 2017 21:14:49 +0000 (16:14 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 11 Dec 2017 03:45:53 +0000 (03:45 +0000)
commit77d2e604b6bc3c319adefca069b5182c325a43b0
tree9545fb1f7f5cdf83a36f2346a9de697e22098c31
parent361edea4707254f4752ffd8c2db6c77a3ab9539c
LU-4134 obdclass: fix double free in failure path

We should just decref for obd if register is failed.
Since class_export_put will invoke class_free_dev,
then we may face a double free.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Ia8d1e487c69c4de1c7c247158cc8615aa6b6093a
Reviewed-on: https://review.whamcloud.com/29967
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/obd_config.c