summaryrefslogtreecommitdiff
path: root/libavutil/fixed_dsp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-22 16:26:53 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-22 16:27:28 +0100
commitc3b6454d801638b091b51fe62937e6831a3a37b2 (patch)
treef553a8de19d65398893097c00a1ff810c5ad47ba /libavutil/fixed_dsp.c
parent22bb5bd7a3b55c25bfef130ad89e8574dd47af1d (diff)
avutil/fixed_dsp: Check for av_malloc() failure
Fixes CID1271051 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/fixed_dsp.c')
-rw-r--r--libavutil/fixed_dsp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/fixed_dsp.c b/libavutil/fixed_dsp.c
index 102a951b69..9f2e841046 100644
--- a/libavutil/fixed_dsp.c
+++ b/libavutil/fixed_dsp.c
@@ -91,6 +91,10 @@ static void vector_fmul_window_fixed_c(int32_t *dst, const int32_t *src0,
AVFixedDSPContext * avpriv_alloc_fixed_dsp(int bit_exact)
{
AVFixedDSPContext * fdsp = av_malloc(sizeof(AVFixedDSPContext));
+
+ if (!fdsp)
+ return NULL;
+
fdsp->vector_fmul_window_scaled = vector_fmul_window_fixed_scaled_c;
fdsp->vector_fmul_window = vector_fmul_window_fixed_c;