lkml.org 
[lkml]   [2010]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net/ipv4: Eliminate kstrdup memory leak
From
From: Julia Lawall <julia@diku.dk>
Date: Fri, 27 Aug 2010 21:47:43 +0200

> The string clone is only used as a temporary copy of the argument val
> within the while loop, and so it should be freed before leaving the
> function. The call to strsep, however, modifies clone, so a pointer to the
> front of the string is kept in saved_clone, to make it possible to free it.
>
> The sematic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
...
> Signed-off-by: Julia Lawall <julia@diku.dk>

Applied, thanks!


\
 
 \ /
  Last update: 2010-08-28 04:35    [W:0.051 / U:8.216 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site