Actions
Bug #9914
closedNV_UNIQUE_NAME_TYPE broken after 9580
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2018-10-22
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
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.
Related issues
Updated by Andrew Stormont almost 4 years ago
- Related to Feature #9580: Add a hash-table on top of nvlist to speed-up operations added
Updated by Andrew Stormont almost 4 years ago
Updated by Electric Monk over 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit b8a5bee186f188738b6a8f63ebf28331543ae32e
commit b8a5bee186f188738b6a8f63ebf28331543ae32e Author: Andrew Stormont <astormont@racktopsystems.com> Date: 2018-12-10T16:00:16.000Z 9914 NV_UNIQUE_NAME_TYPE broken after 9580 Reviewed by: Yuri Pankov <yuripv@yuripv.net> Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Approved by: Dan McDonald <danmcd@joyent.com>
Actions