L
loudking
Hi, all
Here is part of my code.
========================================
void *record;
/* treat record */
if (record) {
fprintf(stderr, "free record start\n");
fprintf(stderr, "char= %s\n", (char*)record);
fprintf(stderr, "hex= %x\n", (u_int)record);
free(record);
fprintf(stderr, "free record end\n");
}
========================================
The output is
========================================
free record start
char= @Ýa X¨-
hex= 92d73e8
*** glibc detected *** double free or corruption (!prev): 0x092d73e8
***
zsh: 18957 abort (core dumped) ./zizzy system/manager
==========================================
Could anybody tell me what is the reason for core-dump?
I already checked if record is empty ....
Here is part of my code.
========================================
void *record;
/* treat record */
if (record) {
fprintf(stderr, "free record start\n");
fprintf(stderr, "char= %s\n", (char*)record);
fprintf(stderr, "hex= %x\n", (u_int)record);
free(record);
fprintf(stderr, "free record end\n");
}
========================================
The output is
========================================
free record start
char= @Ýa X¨-
hex= 92d73e8
*** glibc detected *** double free or corruption (!prev): 0x092d73e8
***
zsh: 18957 abort (core dumped) ./zizzy system/manager
==========================================
Could anybody tell me what is the reason for core-dump?
I already checked if record is empty ....