Re: [smbfs.c]: Fix recently introduced memory leak

Andrew V. Samoilov wrote:
Hi, Roland!

I have applied a slight variant of your patch. Your patch didn't fix a memory leak (to my knowledge), but I discovered one while checking and

What about previous smbfs_get_remote_stat(), smbfs_mkdir() and smbfs_rmdir()?


char *mypath = g_strdup(path);
smbfs_convert_path (&mypath, FALSE); /* in-place editing */
if (condition) {
    free (mypath);
} else {
    free (mypath);

That's the part that matters to the mypath variable. I can't see any memory leak here. Ah, well, it's the smbfs_convert_path() function that had leaked. Sorry, sorry, sorry. Now I see it.

BTW, these lines are from HACKING:
> [...]
changes.  The developer applying your patch can format the code for you.

Sorry, I had forgotten to remember this line while committing. I'll make up for it.

P.S. Please use () after function name in ChangeLog(s) entries and begin this one with * filename (function): Description .

I'll do.


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