[lkml]   [2017]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] arcnet: com20020-pci: Fix an error handling path in 'com20020pci_probe()'
From: Christophe JAILLET <>
Date: Fri, 7 Jul 2017 06:56:16 +0200

> If this memory allocation fails, we should go through the error handling
> path as done everywhere else in this function before returning.
> Signed-off-by: Christophe JAILLET <>

This is really the tip of the iceberg here and this function's cleanup
really needs to be shored up more completely than this.

If the allocation of 'card' succeeds, and one of the "goto out_port"
paths are taken, 'card' is leaked because the last thing performed
is linking it into the list inside of 'priv'.

Anyways, I'll apply this but there are so many more leaks here.

 \ /
  Last update: 2017-07-07 10:29    [W:0.029 / U:5.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site