test_pbuf: free pbufs at the end of tests

This commit is contained in:
goldsimon 2017-06-29 20:43:33 +02:00
parent ca9eae26e1
commit 5d10e1b6c3

View File

@ -222,6 +222,7 @@ START_TEST(test_pbuf_take_at_edge)
fail_unless(out[i] == testdata[i], fail_unless(out[i] == testdata[i],
"Bad data at pos %d, was %02X, expected %02X", p->len+i, out[i], testdata[i]); "Bad data at pos %d, was %02X, expected %02X", p->len+i, out[i], testdata[i]);
} }
pbuf_free(p);
} }
END_TEST END_TEST
@ -251,6 +252,7 @@ START_TEST(test_pbuf_get_put_at_edge)
getdata = pbuf_get_at(p, p->len); getdata = pbuf_get_at(p, p->len);
fail_unless(*out == getdata, fail_unless(*out == getdata,
"pbuf_get_at() returned bad data at pos %d, was %02X, expected %02X", p->len, getdata, *out); "pbuf_get_at() returned bad data at pos %d, was %02X, expected %02X", p->len, getdata, *out);
pbuf_free(p);
} }
END_TEST END_TEST