]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aft.c
aft.c: Fix a possible memory leak.
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index 6010d5def12175af7b3be545bd2d475aa7703b7b..9fca561cdd5919e011e07673a54e8a4f00f21003 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -733,9 +733,9 @@ int open_and_update_audio_file(struct osl_row *aft_row,
        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;
-       free(afd->afhi.chunk_table);
 err:
        osl_close_disk_object(&chunk_table_obj);
        return ret;