diff mbox

[FFmpeg-devel,V2,2/3] avfilter/dnn_backend_native: fix invalid free

Message ID 20180919025513.20438-2-quinkblack@foxmail.com
State New
Headers show

Commit Message

zhilizhao Sept. 19, 2018, 2:55 a.m. UTC
---
 libavfilter/dnn_backend_native.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pedro Arthur Sept. 19, 2018, 4:22 p.m. UTC | #1
Pushed,
Thanks!

2018-09-18 23:55 GMT-03:00 Zhao Zhili <quinkblack@foxmail.com>:

> ---
>  libavfilter/dnn_backend_native.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/dnn_backend_native.c b/libavfilter/dnn_backend_
> native.c
> index 184fe54..7dd35d46 100644
> --- a/libavfilter/dnn_backend_native.c
> +++ b/libavfilter/dnn_backend_native.c
> @@ -343,7 +343,7 @@ void ff_dnn_free_model_native(DNNModel **model)
>              }
>              av_freep(&network->layers[layer].params);
>          }
> -        av_freep(network);
> +        av_freep(&network);
>          av_freep(model);
>      }
>  }
> --
> 2.9.5
>
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
diff mbox

Patch

diff --git a/libavfilter/dnn_backend_native.c b/libavfilter/dnn_backend_native.c
index 184fe54..7dd35d46 100644
--- a/libavfilter/dnn_backend_native.c
+++ b/libavfilter/dnn_backend_native.c
@@ -343,7 +343,7 @@  void ff_dnn_free_model_native(DNNModel **model)
             }
             av_freep(&network->layers[layer].params);
         }
-        av_freep(network);
+        av_freep(&network);
         av_freep(model);
     }
 }