I am getting above error on following code. I have attached respective backtrace for the same
System details: Cent os: 7.5.1804 GCC: 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
bool FileTransfer::dirExist(string strDirName)
{
    //error on below line
    DIR* dir = opendir(strDirName.c_str());
    if(NULL == dir)
       return false;
    else
       return true ;
}
and backtrace for above
#0  0x00007f36afe9c62c in malloc_consolidate () from /lib64/libc.so.6
#1  0x00007f36afe9e275 in _int_malloc () from /lib64/libc.so.6
#2  0x00007f36afea184c in malloc () from /lib64/libc.so.6
#3  0x00007f36afedc9c1 in __alloc_dir () from /lib64/libc.so.6
#4  0x00007f36b25cb7ec in FileTransfer::dirExist (this=this@entry=0x7fff0c1d5d60,strDirName="/home/praveen/file_process/TCP_DUMP/Process") at filetransfer.cc:15
Any Help is appreciated.
