summaryrefslogtreecommitdiff
path: root/src/libxinevdec/rgb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libxinevdec/rgb.c')
-rw-r--r--src/libxinevdec/rgb.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libxinevdec/rgb.c b/src/libxinevdec/rgb.c
index 85307b155..1cf61febe 100644
--- a/src/libxinevdec/rgb.c
+++ b/src/libxinevdec/rgb.c
@@ -140,8 +140,7 @@ static void rgb_decode_data (video_decoder_t *this_gen,
this->bytes_per_pixel = (this->bit_depth + 1) / 8;
- if (this->buf)
- free (this->buf);
+ free (this->buf);
/* minimal buffer size */
this->bufsize = this->width * this->height * this->bytes_per_pixel;
@@ -381,10 +380,7 @@ static void rgb_discontinuity (video_decoder_t *this_gen) {
static void rgb_dispose (video_decoder_t *this_gen) {
rgb_decoder_t *this = (rgb_decoder_t *) this_gen;
- if (this->buf) {
- free (this->buf);
- this->buf = NULL;
- }
+ free (this->buf);
if (this->decoder_ok) {
this->decoder_ok = 0;