i've written a code that simply forks a process,executes a command thru
execve() and exits,wherein i've used
char *fildes;
allocated a char sting to fildes by
char *itoa(int x)
filedes=itoa(3);

and then execve(args[0],args,env);
wherein on of the contents of args[0] is fildes.

now when i do
free(fildes);

I get error
*** glibc detected *** free(): invalid pointer: 0x080a6bfe ***
Aborted.

can u tell wotz prob with the code.
ANY INPUT IS APPRECIATED