--- linux-2.6.0-test5.old/drivers/media/video/bttv-risc.c 2003-08-23 07:55:44.000000000 +0800 +++ linux-2.6.0-test5.new/drivers/media/video/bttv-risc.c 2003-09-16 16:48:37.000000000 +0800 @@ -219,8 +219,10 @@ instructions = (ov->nclips + 1) * ((skip_even || skip_odd) ? ov->w.height>>1 : ov->w.height); instructions += 2; - if ((rc = btcx_riscmem_alloc(btv->dev,risc,instructions*8)) < 0) + if ((rc = btcx_riscmem_alloc(btv->dev,risc,instructions*8)) < 0) { + kfree(skips); return rc; + } /* sync instruction */ rp = risc->cpu;