From: David Schleef Date: Sat, 26 Feb 2000 23:01:13 +0000 (+0000) Subject: rvfree memleak fix X-Git-Tag: r0_7_40~27 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6fd6ac20593635090693d1c097fa22be7712fac8;p=comedi.git rvfree memleak fix --- diff --git a/comedi/drivers.c b/comedi/drivers.c index 59f57572..d8b5aa7d 100644 --- a/comedi/drivers.c +++ b/comedi/drivers.c @@ -183,12 +183,14 @@ static void postconfig(comedi_device *dev) if(s->trig[1] || s->trig[2] || s->trig[3] ||s->trig[4]) have_trig=1; +#ifdef CONFIG_COMEDI_VER08 if(s->do_cmd && !have_trig){ s->trig[1]=command_trig; s->trig[2]=command_trig; s->trig[3]=command_trig; s->trig[4]=command_trig; } +#endif if(s->do_cmd || have_trig){ s->prealloc_bufsz=1024*128; }else{ @@ -197,7 +199,7 @@ static void postconfig(comedi_device *dev) if(s->prealloc_bufsz){ /* XXX */ - s->prealloc_buf=rvmalloc(s->prealloc_bufsz*sizeof(sampl_t)); + s->prealloc_buf=rvmalloc(s->prealloc_bufsz); if(!s->prealloc_buf){ printk("ENOMEM\n"); }