diff mbox

[FFmpeg-devel,5/7] libavfilter/dnn_backend_tf.c: Fixes ff_dnn_free_model_tf.

Message ID 20180802185248.18168-6-dualfal@gmail.com
State Accepted
Commit 2ecf9d103a730f2943044b507b6e23326aa00749
Headers show

Commit Message

Sergey Lavrushkin Aug. 2, 2018, 6:52 p.m. UTC
---
 libavfilter/dnn_backend_tf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavfilter/dnn_backend_tf.c b/libavfilter/dnn_backend_tf.c
index 7a4ad72d27..662a2a3c6e 100644
--- a/libavfilter/dnn_backend_tf.c
+++ b/libavfilter/dnn_backend_tf.c
@@ -570,7 +570,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);
     }