[rrd-users] why does/should rrd_create() alter argv?

Rick Jones rick.jones2 at hp.com
Thu Apr 28 00:40:36 CEST 2011


On Wed, 2011-04-27 at 17:20 -0400, Pablo Sanchez wrote:
> [ Comments below, in line ]
> 
> On Wednesday 27 April 2011 at 5:14 pm, Rick Jones penned
> about "[rrd-users] why does/should rrd_create()  alter argv?"
> 
> > I'm concerned there is a memory leak since rrd_create() is shuffling
> > things around.
> 
> Howdy,
> 
> When I read your post, I thought:  leaky memory.  Have you run
> `valgrind' on your code?  I believe Tobi is pretty good about running
> it on his code so while it's possible RRD has an issue, it may be more
> probable that it's in your code.

I do have valgrind installed on my development box but have not run it
against my work in progress recently.  

I don't discount that I have memory leaks, but still, if rrd_create() is
shuffling around things in argv, and not leaving them there "somewhere"
for me to find after the rrd_create() call returns then the code I have
to later free the argv cannot free them because the reference to them is
kept in argv.

That is why I'm asking if rrd_create() really should be messing with the
argv it is passed.

rick



More information about the rrd-users mailing list