ctdb-tests: Fix some incorrect memory allocations