wdc_get_dui_log_size allocates a buffer and then advances the
returned pointer. Passing this advanced pointer to free() is UB,
so save the original pointer to pass to free() instead.
Reported by: GCC 12 -Wfree-nonheap-object
Differential D36827
nvmecontrol wdc: Don't pass a bogus pointer to free(). jhb on Sep 29 2022, 10:39 PM. Authored by Tags None Referenced Files
Subscribers
Details wdc_get_dui_log_size allocates a buffer and then advances the Reported by: GCC 12 -Wfree-nonheap-object
Diff Detail
|