libavfilter/dnn_backend_tf.c: Fixes ff_dnn_free_model_tf.
authorSergey Lavrushkin <dualfal@gmail.com>
Tue, 31 Jul 2018 15:40:24 +0000 (18:40 +0300)
committerPedro Arthur <bygrandao@gmail.com>
Tue, 14 Aug 2018 18:02:09 +0000 (15:02 -0300)
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
libavfilter/dnn_backend_tf.c

index bd21137..971a914 100644 (file)
@@ -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);
     }