libceph, ceph: avoid memory leak when specifying same option several times
authorChengguang Xu <cgxu519@icloud.com>
Tue, 6 Feb 2018 00:25:55 +0000 (08:25 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 26 Feb 2018 15:19:30 +0000 (16:19 +0100)
commit937441f3a3158d5510ca8cc78a82453f57a96365
tree50f5222a92bd9b764d95e9dc2bd78e63d83d98a3
parent6ef0bc6ddee1f62310877a1d53b1ea1d0d8e51a2
libceph, ceph: avoid memory leak when specifying same option several times

When parsing string option, in order to avoid memory leak we need to
carefully free it first in case of specifying same option several times.

Signed-off-by: Chengguang Xu <cgxu519@icloud.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/super.c
net/ceph/ceph_common.c