diff --git a/newbrt/pma-test.c b/newbrt/pma-test.c index 2b4ceba0e0a..7c9b70728d1 100644 --- a/newbrt/pma-test.c +++ b/newbrt/pma-test.c @@ -78,6 +78,7 @@ static void test_pma_find (void) { pma->N = N; for (i=0; ipairs[i].key=0; assert(pma_index_limit(pma)==N); + pma->compare_fun = default_compare_fun; r=pmainternal_find(pma, fill_dbt(&k, "hello", 5), 0); assert(r==0); @@ -111,16 +112,18 @@ static void test_pma_find (void) { void test_smooth_region_N (int N) { struct pair pairs[N]; char *strings[100]; - char string[100]; + char string[N]; int i; int len; if (N<10) len=1; else if (N<100) len=2; else len=8; + for (i=0; ipairs); - toku_free(pma); if (pma->skey) toku_free(pma->skey); if (pma->sval) toku_free(pma->sval); + toku_free(pma); *pmap=0; return 0; }