bdev: Fix warning about potenial memory leak about histogram.
Pointer passthrough g_histogram and histogram implicitly ,but the checker
still complains about this, change to spdk_histogram_data_free(histogram)
directly, no need any assert any more.
bdev_ut.c:1486:2: warning: Potential leak of memory pointed to by 'histogram'
poll_threads();
^~~~~~~~~~~~~~
1 warning generated.
Change-Id: I609c1c92643ad03b8e3c62cd8434882e7942efa4
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462789
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
a78b7bb18c
commit
e3b90fe2d5
@ -1498,7 +1498,7 @@ bdev_histograms_mt(void)
|
||||
CU_ASSERT(g_status == 0);
|
||||
CU_ASSERT(g_bdev.bdev.internal.histogram_enabled == false);
|
||||
|
||||
spdk_histogram_data_free(g_histogram);
|
||||
spdk_histogram_data_free(histogram);
|
||||
|
||||
/* Tear down the channels */
|
||||
set_thread(0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user