Commit 9850ccd
dm zoned: free dmz->ddev array in dmz_put_zoned_devices
Commit 4dba128 ("dm zoned: support arbitrary number of devices")
made the pointers to additional zoned devices to be stored in a
dynamically allocated dmz->ddev array. However, this array is not freed.
Rename dmz_put_zoned_device to dmz_put_zoned_devices and fix it to
free the dmz->ddev array when cleaning up zoned device information.
Remove NULL assignment for all dmz->ddev elements and just free the
dmz->ddev array instead.
Found by Linux Verification Center (linuxtesting.org).
Fixes: 4dba128 ("dm zoned: support arbitrary number of devices")
Cc: stable@vger.kernel.org
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>1 parent ce9ecca commit 9850ccd
1 file changed
+7
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
751 | | - | |
| 751 | + | |
752 | 752 | | |
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
756 | | - | |
757 | | - | |
| 756 | + | |
| 757 | + | |
758 | 758 | | |
759 | | - | |
760 | | - | |
761 | | - | |
| 759 | + | |
| 760 | + | |
762 | 761 | | |
763 | 762 | | |
764 | 763 | | |
| |||
948 | 947 | | |
949 | 948 | | |
950 | 949 | | |
951 | | - | |
| 950 | + | |
952 | 951 | | |
953 | 952 | | |
954 | 953 | | |
| |||
978 | 977 | | |
979 | 978 | | |
980 | 979 | | |
981 | | - | |
| 980 | + | |
982 | 981 | | |
983 | 982 | | |
984 | 983 | | |
| |||
0 commit comments