X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;ds=sidebyside;f=aft.c;h=d843692934df671684d383ba4ec59996659ef75e;hb=25f41ad9243f73f2027c69c8dac9be39cdb506bb;hp=0bf38fe691838b78cc35a1a8cde344147b5d4f47;hpb=c8862b9e246b4ef6ff1fe103946e18cf2537ecde;p=paraslash.git diff --git a/aft.c b/aft.c index 0bf38fe6..d8436929 100644 --- a/aft.c +++ b/aft.c @@ -660,6 +660,7 @@ int open_and_update_audio_file(struct osl_row *aft_row, long score, AFTCOL_CHUNKS, &chunk_table_obj); if (ret < 0) return ret; + afd->afhi.chunk_table = NULL; ret = mmap_full_file(path, O_RDONLY, &map.data, &map.size, &afd->fd); if (ret < 0) @@ -697,10 +698,8 @@ int open_and_update_audio_file(struct osl_row *aft_row, long score, aced.old_afsi = &old_afsi; afs_event(AFSI_CHANGE, NULL, &aced); ret = save_afd(afd); - free(afd->afhi.chunk_table); - if (ret < 0) - goto err; err: + free(afd->afhi.chunk_table); osl_close_disk_object(&chunk_table_obj); return ret; }