[FFmpeg-cvslog] libavfilter/dnn_backend_tf.c: Fixes ff_dnn_free_model_tf.

Sergey Lavrushkin git at videolan.org
Tue Aug 14 21:37:00 EEST 2018


ffmpeg | branch: master | Sergey Lavrushkin <dualfal at gmail.com> | Tue Jul 31 18:40:24 2018 +0300| [2ecf9d103a730f2943044b507b6e23326aa00749] | committer: Pedro Arthur

libavfilter/dnn_backend_tf.c: Fixes ff_dnn_free_model_tf.

Signed-off-by: Pedro Arthur <bygrandao at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2ecf9d103a730f2943044b507b6e23326aa00749
---

 libavfilter/dnn_backend_tf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/dnn_backend_tf.c b/libavfilter/dnn_backend_tf.c
index bd21137a8a..971a914c67 100644
--- a/libavfilter/dnn_backend_tf.c
+++ b/libavfilter/dnn_backend_tf.c
@@ -571,7 +571,9 @@ void ff_dnn_free_model_tf(DNNModel **model)
         if (tf_model->input_tensor){
             TF_DeleteTensor(tf_model->input_tensor);
         }
-        av_freep(&tf_model->output_data->data);
+        if (tf_model->output_data){
+            av_freep(&(tf_model->output_data->data));
+        }
         av_freep(&tf_model);
         av_freep(model);
     }



More information about the ffmpeg-cvslog mailing list