diff options
author | Vinson Lee <[email protected]> | 2011-11-03 21:10:45 -0700 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2011-11-05 22:09:03 -0700 |
commit | adb7f1351e4c231184a6355573c01c7780135342 (patch) | |
tree | f0f6b1aca43f5f498ecfdfa3da9280af48f82658 /src/gallium/auxiliary/vl | |
parent | 9288253051feb05ba155e4f939284360fdd70b15 (diff) |
g3dvl: Fix memory leaks on error paths.
Fixes Coverity resource leak defect.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mpeg12_decoder.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c index d4b8ae0417a..2442d784ecb 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c @@ -1116,11 +1116,14 @@ vl_create_mpeg12_decoder(struct pipe_context *context, default: assert(0); + FREE(dec); return NULL; } - if (!format_config) + if (!format_config) { + FREE(dec); return NULL; + } if (!init_zscan(dec, format_config)) goto error_zscan; |