Re: [patch v2] [media] stv090x: handle allocation failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 15 February 2011 11:10:08 Dan Carpenter wrote:
> kmalloc() can fail so check whether state->internal is NULL.
> append_internal() can return NULL on allocation failures so check that.
> Also if we hit the error condition later in the function then there is
> a memory leak and we need to call remove_dev() to fix it.
> 
> Also Oliver Endriss pointed out an additional leak that I missed in the
> first version of this patch.
> 
> Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>
> ---
> v2:  Fix the leak Oliver noticed.
> 
> diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c
> ...

Acked-by: Oliver Endriss <o.endriss@xxxxxx>

CU
Oliver

-- 
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
4 MByte Mod: http://www.escape-edv.de/endriss/dvb-mem-mod/
Full-TS Mod: http://www.escape-edv.de/endriss/dvb-full-ts-mod/
----------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux