Message ID | 20210626015614.517103-1-13145886936@163.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3] tools/testing/nvdimm: Remove NULL test before vfree | expand |
diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c index 54f367cbadae..cb86f0cbb11c 100644 --- a/tools/testing/nvdimm/test/nfit.c +++ b/tools/testing/nvdimm/test/nfit.c @@ -1641,8 +1641,8 @@ static void *__test_alloc(struct nfit_test *t, size_t size, dma_addr_t *dma, err: if (*dma && size >= DIMM_SIZE) gen_pool_free(nfit_pool, *dma, size); - if (buf) - vfree(buf); + + vfree(buf); kfree(nfit_res); return NULL; }