summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-02-07 15:35:03 -0800
committerChase Douglas <chase.douglas@canonical.com>2012-02-10 13:20:48 -0800
commit7bcbf8eb110b1f7c6c085d3dcd69f66b00df2b8a (patch)
tree667098e4cd37d0f4e09b0de3364fec04e8496319 /test
parenta78d55d021c9cd3be6501760d6fca3464ea6dec8 (diff)
Allocate SynapticsPrivate.comm->hwState
This is needed for when SynapticsHwState can't be allocated on the stack. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test')
-rw-r--r--test/eventcomm-test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/eventcomm-test.c b/test/eventcomm-test.c
index 920d6ec..92397d6 100644
--- a/test/eventcomm-test.c
+++ b/test/eventcomm-test.c
@@ -57,9 +57,11 @@ static void
reset_data(struct SynapticsHwState **hw, struct CommData *comm,
SynapticsPrivate *priv)
{
+ SynapticsHwStateFree(&comm->hwState);
memset(comm, 0, sizeof(struct CommData));
SynapticsHwStateFree(hw);
*hw = SynapticsHwStateAlloc(priv);
+ comm->hwState = SynapticsHwStateAlloc(priv);
}
/**
@@ -190,6 +192,7 @@ test_read_hw_state(void)
free(private.proto_data);
SynapticsHwStateFree(&hw);
+ SynapticsHwStateFree(&comm.hwState);
}
static Bool
@@ -315,6 +318,7 @@ test_ignore_hw_state(void)
free(private.proto_data);
SynapticsHwStateFree(&hw);
SynapticsHwStateFree(&hw_zero);
+ SynapticsHwStateFree(&comm.hwState);
}
int main (int argc, char **argv)