diff --git a/testsuite/slurm_unit/common/slurmdb_pack/pack_assoc_rec_with_usage-test.c b/testsuite/slurm_unit/common/slurmdb_pack/pack_assoc_rec_with_usage-test.c
index a241867623511ae86433b0ca6f23991a3ad7d3ea..391f937141aa27efb5914a14a3c267b230009e65 100644
--- a/testsuite/slurm_unit/common/slurmdb_pack/pack_assoc_rec_with_usage-test.c
+++ b/testsuite/slurm_unit/common/slurmdb_pack/pack_assoc_rec_with_usage-test.c
@@ -15,6 +15,8 @@ START_TEST(invalid_protocol)
 	uint32_t x;
 
 	slurmdb_assoc_rec_t *assoc_rec = xmalloc(sizeof(slurmdb_assoc_rec_t));
+	assoc_rec->usage = xmalloc(sizeof(slurmdb_assoc_usage_t));
+
 	Buf buf = init_buf(1024);
 
 	pack32(22, buf);