]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
aft.c: Fix a possible memory leak.
authorAndre Noll <maan@systemlinux.org>
Sat, 3 Nov 2007 21:00:16 +0000 (22:00 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 3 Nov 2007 21:00:16 +0000 (22:00 +0100)
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);
        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;
        if (ret < 0)
                goto err;
-       free(afd->afhi.chunk_table);
 err:
        osl_close_disk_object(&chunk_table_obj);
        return ret;
 err:
        osl_close_disk_object(&chunk_table_obj);
        return ret;