*** glibc detected *** ./IrayGui: double free or corruption (!prev): 0x003e47f8 ***
00128000-0012c000 rwxp 00118000 b3:02 31097 /home/root/myGui
0012c000-004a3000 rwxp 00000000 00:00 0 [heap]
40000000-4001c000 r-xp 00000000 b3:02 69699 /lib/ld-2.6.1.so
4001c000-40023000 rwxp 00000000 00:00 0
40023000-40024000 r-xp 0001b000 b3:02 69699 /lib/ld-2.6.1.so
40024000-40025000 rwxp 0001c000 b3:02 69699 /lib/ld-2.6.1.so
40025000-40027000 r-xp 00000000 b3:02 49246 /usr/lib/libEGL.so.1.1.14.2616
40027000-4002e000 ---p 00002000 b3:02 49246 /usr/lib/libEGL.so.1.1.14.2616
4002e000-4002f000 rwxp 00001000 b3:02 49246 /usr/lib/libEGL.so.1.1.14.2616
4002f000-400e2000 r-xp 00000000 b3:02 49219 /usr/lib/libasound.so.2.0.0
400e2000-400ea000 ---p 000b3000 b3:02 49219 /usr/lib/libasound.so.2.0.0
400ea000-400ee000 rwxp 000b3000 b3:02 49219 /usr/lib/libasound.so.2.0.0
400ee000-4013e000 r-xp 00000000 b3:02 86474 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libphonon.so.4.4.0
4013e000-40140000 rwxp 00050000 b3:02 86474 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libphonon.so.4.4.0
40140000-40164000 r-xp 00000000 b3:02 86493 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtMultimedia.so.4.7.3
40164000-4016c000 ---p 00024000 b3:02 86493 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtMultimedia.so.4.7.3
4016c000-4016d000 rwxp 00024000 b3:02 86493 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtMultimedia.so.4.7.3
4016d000-401e0000 r-xp 00000000 b3:02 15606 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtDBus.so.4.7.3
401e0000-401e7000 ---p 00073000 b3:02 15606 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtDBus.so.4.7.3
401e7000-401e9000 rwxp 00072000 b3:02 15606 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtDBus.so.4.7.3
401e9000-40229000 r-xp 00000000 b3:02 86430 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtXml.so.4.7.3
40229000-40230000 ---p 00040000 b3:02 86430 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtXml.so.4.7.3
40230000-40232000 rwxp 0003f000 b3:02 86430 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtXml.so.4.7.3
40232000-402a0000 r-xp 00000000 b3:02 86456 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtOpenGL.so.4.7.3
402a0000-402a8000 ---p 0006e000 b3:02 86456 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtOpenGL.so.4.7.3
402a8000-402aa000 rwxp 0006e000 b3:02 86456 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtOpenGL.so.4.7.3
402aa000-40c76000 r-xp 00000000 b3:02 86499 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtGui.so.4.7.3
40c76000-40c7d000 ---p 009cc000 b3:02 86499 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtGui.so.4.7.3
40c7d000-40ca8000 rwxp 009cb000 b3:02 86499 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtGui.so.4.7.3
40ca8000-40caa000 rwxp 00000000 00:00 0
40caa000-40d9f000 r-xp 00000000 b3:02 86498 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtNetwork.so.4.7.3
40d9f000-40da6000 ---p 000f5000 b3:02 86498 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtNetwork.so.4.7.3
40da6000-40daa000 rwxp 000f4000 b3:02 86498 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtNetwork.so.4.7.3
40daa000-41096000 r-xp 00000000 b3:02 86486 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtCore.so.4.7.3
41096000-4109e000 ---p 002ec000 b3:02 86486 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtCore.so.4.7.3
4109e000-410a7000 rwxp 002ec000 b3:02 86486 /usr/local/qt-emembeded-4.7.3-arm-linux/lib/libQtCore.so.4.7.3
410a7000-410ce000 r-xp 00000000 b3:02 48001 /usr/lib/libdbus-1.so.3.4.0
410ce000-410d6000 ---p 00027000 b3:02 48001 /usr/lib/libdbus-1.so.3.4.0
410d6000-410d7000 r-xp 00027000 b3:02 48001 /usr/lib/libdbus-1.so.3.4.0
410d7000-410d8000 rwxp 00028000 b3:02 48001 /usr/lib/libdbus-1.so.3.4.0
410d8000-410de000 r-xp 00000000 b3:02 69713
问题所在:指针重复释放
解决方案:
if(p)
{
free(p);
p = NULL;
}
这样释放可以防止指针重复释放。