test/memzone: fix NULL freeing
authorPhil Yang <phil.yang@arm.com>
Mon, 15 Jan 2018 05:43:32 +0000 (13:43 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 17 Jan 2018 23:48:34 +0000 (00:48 +0100)
No need to free a NULL memzone. It will cause test
termination.

Fixes: 71330483a193 ("test/memzone: fix memory leak")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
test/test/test_memzone.c

index 83c94eb..151a997 100644 (file)
@@ -251,10 +251,6 @@ test_memzone_reserve_flags(void)
                                printf("MEMZONE FLAG 2MB\n");
                                return -1;
                        }
-                       if (rte_memzone_free(mz)) {
-                               printf("Fail memzone free\n");
-                               return -1;
-                       }
                }
 
                if (hugepage_2MB_avail && hugepage_1GB_avail) {