Boost logo

Boost :

From: prateek khanna (prateek_at_[hidden])
Date: 2007-01-22 05:22:24


Hi,

Whenever i try to perform any filesystem library operation in Linux i
get following message at runtime.

I written following code

int SystemCall::Remove(std::string strAbsFilename)
{
        fs::path del_path ( fs::initial_path() );
        del_path = fs::system_complete( fs::path( strAbsFilename,
fs::native ) );
        if(fs::exists( del_path ))
        {
            int i = fs::remove(del_path);
            cout << i << "\n";
        }
        else
        {
            cout << strAbsFilename.c_str() << " not found.";
            return 0;
        }
        cout << "\nSuccessfully deleted.";
        return 1;
}

This code deleted the file passed to it as an argument. But give runtime
message
"free(): invalid pointer 0x91d5638! ".

1) Is it a memory leak ?
2) Can this lead to a bigger problem. Because my code works perfectly
fine except this message.?

thanks and regards
Prateek Khanna
Software Developer
Baysquare Technologies


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk