Fixes CID1244189
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
... | ... |
@@ -170,8 +170,10 @@ static av_cold int init(AVFilterContext *ctx) |
170 | 170 |
return ret; |
171 | 171 |
} |
172 | 172 |
|
173 |
- if (!(flite->text = av_malloc(textbuf_size+1))) |
|
173 |
+ if (!(flite->text = av_malloc(textbuf_size+1))) { |
|
174 |
+ av_file_unmap(textbuf, textbuf_size); |
|
174 | 175 |
return AVERROR(ENOMEM); |
176 |
+ } |
|
175 | 177 |
memcpy(flite->text, textbuf, textbuf_size); |
176 | 178 |
flite->text[textbuf_size] = 0; |
177 | 179 |
av_file_unmap(textbuf, textbuf_size); |