]> git.tue.mpg.de Git - paraslash.git/commitdiff
fecdec: Fix a double-free bug in clear_group().
authorAndre Noll <maan@systemlinux.org>
Sat, 19 Dec 2009 15:47:20 +0000 (16:47 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 19 Dec 2009 15:47:20 +0000 (16:47 +0100)
We must make sure fg->data isn't freed twice.

fecdec_filter.c

index a6218e436506d8000192a3cbb8f7a44da1133d32..8cb17ad642098e81621e2be6f6c0643ac6de4038 100644 (file)
@@ -108,7 +108,9 @@ static void clear_group(struct fecdec_group *fg)
                fg->idx[i] = -1;
        }
        free(fg->data);
+       fg->data = NULL;
        free(fg->idx);
+       fg->idx = NULL;
        fg->num_slices = 0;
        memset(&fg->h, 0, sizeof(struct fec_header));
        fg->num_received_slices = 0;