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 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit aab83bb83be7342f6cfccaed8d5fe0b2f404855d Author: Josef 'Jeff' Sipek <email@example.com> Date: 2016-02-27T16:52:10.000Z 6659 nvlist_free(NULL) is a no-op Reviewed by: Toomas Soome <firstname.lastname@example.org> Reviewed by: Marcel Telka <email@example.com> Approved by: Robert Mustacchi <firstname.lastname@example.org>