lkml.org 
[lkml]   [1997]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux 2.1.72 - a few oddities
Brian says:
----------------------------------------------------------
From: Brian M Grunkemeyer <bg2k@CMU.EDU>
Date: Tue, 9 Dec 1997 22:35:44 -0500 (EST)
Subject: Re: Linux 2.1.72 - a few oddities.

Excerpts from internet.computing.linux-kernel: 10-Dec-97 Linux 2.1.72 -
a few oddities. by David Woodhouse@cam.ac.u
> - /* Free device too !! - AC FIXME: CHECK THIS IS RIGHT */
> - if (devc)
> + if (!devc)
> vfree(devc);

Doesn't this now only vfree devc if it is 0, as opposed to freeing it if
it is allocated? Looks like you introduced a memory leak. If you
really want to be picky, try:

if (NULL != devc)
[snip]
-------------------------------------------
Look a little higher in the code and you will see:
if (devc == NULL)
return;
So why not just vfree(devc);
--
Garst

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.027 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site