Whamcloud - gitweb
LU-4134 obdclass: fix double free in failure path 87/30487/2
authorYang Sheng <yang.sheng@intel.com>
Mon, 27 Nov 2017 21:14:49 +0000 (16:14 -0500)
committerJohn L. Hammond <john.hammond@intel.com>
Thu, 4 Jan 2018 17:21:36 +0000 (17:21 +0000)
commit2c2f42ccd55601b410e35f76d89b2691f11250b1
tree5d1e778216247811f89ffd812231de20b402922d
parent09debb54bcf6d04ca9ff257fa721260f80ce8138
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.

Lustre-change: https://review.whamcloud.com/29967
Lustre-commit: 77d2e604b6bc3c319adefca069b5182c325a43b0

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Ia8d1e487c69c4de1c7c247158cc8615aa6b6093a
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30487
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/obdclass/obd_config.c