# HG changeset patch # User mas01cr # Date 1228985646 0 # Node ID ad2206c249865edfa9aec3f1e261fa1999d8cb66 # Parent d7e590d58c853ca764fa0951ed2e8605051f199f Fix a memory corruption bug. When allocating the adb_t in audiodb_open(), zero the memory; then we're not going to try to free() or delete some arbitrary uninitialized thing if the thing that we're opening turns out not to be an audiodb database. diff -r d7e590d58c85 -r ad2206c24986 open.cpp --- a/open.cpp Thu Dec 11 08:54:01 2008 +0000 +++ b/open.cpp Thu Dec 11 08:54:06 2008 +0000 @@ -56,7 +56,7 @@ goto error; } - adb = (adb_t *) malloc(sizeof(adb_t)); + adb = (adb_t *) calloc(1, sizeof(adb_t)); if(!adb) { goto error; }