[Pvfs2-developers] double free error on pvfs2-ls

Sumit Narayan sumnaray at gmail.com
Tue Nov 11 14:05:54 EST 2008


Hi,

I ran across this error while doing pvfs2-ls on my machine. It appears  
on my mac machine but I do not see this on my linux box.

prompt$  pvfs2-ls
lost+found
pvfs2-ls(53274) malloc: *** error for object 0x100180: double free
*** set a breakpoint in malloc_error_break to debug

Using debugging options and looking at the source code, I found this  
in src/apps/admin/pvfs2-ls.c

int main(int argc, char **argv)
{
     ......
     free(user_opts->start);
     free(pvfs_path);
     free(fs_id_array);
     free(user_opts);

     PVFS_sys_finalize();
     if (user_opts)
	free(user_opts);
     ....
}

I do not know why there are two free(user_opts), but putting user_opts  
= NULL after the first free resolves it. Any particular reason for  
double free?

-- Sumit


More information about the Pvfs2-developers mailing list