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 a6218e4..8cb17ad 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;