From: John Darrington Date: Sat, 28 Jul 2012 07:52:09 +0000 (+0200) Subject: Fix memory leak in datasheet-test.c X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94c9abdc9872c84125baacdf69708029a40d1f7c;p=pspp Fix memory leak in datasheet-test.c --- diff --git a/tests/data/datasheet-test.c b/tests/data/datasheet-test.c index 98be04fe44..15e2c488fc 100644 --- a/tests/data/datasheet-test.c +++ b/tests/data/datasheet-test.c @@ -424,9 +424,12 @@ datasheet_mc_init (struct mc *mc) if (params->backing_rows == 0 && params->n_backing_cols == 0) { /* Create unbacked datasheet. */ + struct caseproto *proto; ds = datasheet_create (NULL); mc_name_operation (mc, "empty datasheet"); - check_datasheet (mc, ds, NULL, 0, caseproto_create ()); + proto = caseproto_create (); + check_datasheet (mc, ds, NULL, 0, proto); + caseproto_unref (proto); } else {