Staging: intel_sst: fix memory leak
authorDan Carpenter <error27@gmail.com>
Sat, 13 Nov 2010 08:58:26 +0000 (11:58 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Nov 2010 20:25:53 +0000 (12:25 -0800)
The original code set "str_info->decode_ibuf" to NULL so the kfree() is
no-op.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/intel_sst/intel_sst_stream_encoded.c

index fbae39fda5c0307151024edd92bc7c65523bb9f0..5c455608b02451ff83708ce847ee4df68d7617a8 100644 (file)
@@ -1269,7 +1269,7 @@ finish:
        dbufs->output_bytes_produced = total_output;
        str_info->status = str_info->prev;
        str_info->prev = STREAM_DECODE;
-       str_info->decode_ibuf = NULL;
        kfree(str_info->decode_ibuf);
+       str_info->decode_ibuf = NULL;
        return retval;
 }