NV_UNIQUE_NAME_TYPE broken after 9580
There's a typo in nvt_remove_nvpair which causes the nvlist_add_* functions to ignore the type when removing entries with the given name/type. This can lead to the wrong entry being removed and multiple entries being created with the same type.
This was uncovered by some unit tests we had for some code that makes use of NV_UNIQUE_NAME. With the fix applied the tests started passing again. It was also observed that code calling into libnvpair was leaking. The leaks also went away after the fix.
Updated by Electric Monk almost 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit b8a5bee186f188738b6a8f63ebf28331543ae32e Author: Andrew Stormont <email@example.com> Date: 2018-12-10T16:00:16.000Z 9914 NV_UNIQUE_NAME_TYPE broken after 9580 Reviewed by: Yuri Pankov <firstname.lastname@example.org> Reviewed by: Garrett D'Amore <email@example.com> Reviewed by: Andy Fiddaman <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>