nvlist_free(NULL) is a no-op
There are a lot of places in the gate that conditionally call nvlist_free() to avoid passing a NULL pointer. It turns out that nvlist_free(NULL) is a no-op (much like free(NULL)), so we can safely remove the condition in the callers.
The change was generated using the Coccinelle patch (see attached) and then tweaked a little by hand to nuke some useless whitespace.
Updated by Electric Monk over 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit aab83bb83be7342f6cfccaed8d5fe0b2f404855d Author: Josef 'Jeff' Sipek <firstname.lastname@example.org> Date: 2016-02-27T16:52:10.000Z 6659 nvlist_free(NULL) is a no-op Reviewed by: Toomas Soome <email@example.com> Reviewed by: Marcel Telka <firstname.lastname@example.org> Approved by: Robert Mustacchi <email@example.com>