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

Submitted by Zhao Zhili on Sept. 13, 2018, 7:49 a.m.

Details

Message ID 20180913074952.2873-2-quinkblack@foxmail.com
State Accepted
Commit 5dad51437916c71dbfb992443a0d45d40a963ce8
Headers show

Commit Message

Zhao Zhili Sept. 13, 2018, 7:49 a.m.
---
 libavfilter/dnn_backend_native.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pedro Arthur Sept. 18, 2018, 2:14 p.m.
Hi,

2018-09-13 4:49 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 baefea7..7ed155d 100644
> --- a/libavfilter/dnn_backend_native.c
> +++ b/libavfilter/dnn_backend_native.c
> @@ -489,7 +489,7 @@ void ff_dnn_free_model_native(DNNModel **model)
>              }
>              av_freep(&network->layers[layer].params);
>          }
> -        av_freep(network);
> +        av_freep(&network);
>          av_freep(model);
>      }
>  }
> --
>
> Patch does not apply, could you reabse it?
Thanks!

Patch hide | download patch | download mbox

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