Module: xenomai-2.5
Branch: master
Commit: 8fafd5340e4b58394ca88a62d64998c3384e4919
URL:    
http://git.xenomai.org/?p=xenomai-2.5.git;a=commit;h=8fafd5340e4b58394ca88a62d64998c3384e4919

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Mon Jan 25 23:42:18 2010 +0100

analogy: [fake] fix a bad access in the detach procedure

---

 ksrc/drivers/analogy/testing/fake.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ksrc/drivers/analogy/testing/fake.c 
b/ksrc/drivers/analogy/testing/fake.c
index ace6f34..24c2943 100644
--- a/ksrc/drivers/analogy/testing/fake.c
+++ b/ksrc/drivers/analogy/testing/fake.c
@@ -336,7 +336,8 @@ int test_attach(a4l_dev_t *dev, a4l_lnkdesc_t *arg)
 
 int test_detach(a4l_dev_t *dev)
 {
-       struct ai_priv *priv = (struct ai_priv *)dev->priv;
+       a4l_subd_t *subd = a4l_get_subd(dev, AI_SUBD);
+       struct ai_priv *priv = (struct ai_priv *)subd->priv;
 
        a4l_task_destroy(&priv->timer_task);
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to