ut/bdev: silence scan-build warnings about histogram memory leaks
bdev_ut.c:1863:2: warning: Potential leak of memory pointed to by 'histogram' poll_threads(); ^~~~~~~~~~~~~~ We used to free g_histogram instead of histogram. Those should be the same thing, but scan-build gets confused. Change the code to free histogram - this should also make it slightly easier to read. Change-Id: Ifaad1c2d9c7f9cc1a106f6edf3d22b54e42fe867 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463256 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
f9cae9d20f
commit
26f6c2a03d
@ -1863,7 +1863,7 @@ bdev_histograms(void)
|
||||
poll_threads();
|
||||
CU_ASSERT(g_status == -EFAULT);
|
||||
|
||||
spdk_histogram_data_free(g_histogram);
|
||||
spdk_histogram_data_free(histogram);
|
||||
spdk_put_io_channel(ch);
|
||||
spdk_bdev_close(desc);
|
||||
free_bdev(bdev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user