[ovs-dev] [PATCH] ovs-lldp: Avoid use-after-free in aa_mapping_unregister().
Dennis Flynn
dflynn20 at gmail.com
Fri Apr 17 16:08:08 UTC 2015
Acked-by: Dennis Flynn <drflynn at avaya.com>
On Thu, Apr 16, 2015 at 5:46 PM, Ben Pfaff <blp at nicira.com> wrote:
> Found by LLVM scan-build.
>
> Reported-by: Kevin Lo <kevlo at FreeBSD.org>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> lib/ovs-lldp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/ovs-lldp.c b/lib/ovs-lldp.c
> index 9ee639e..bf1b61d 100644
> --- a/lib/ovs-lldp.c
> +++ b/lib/ovs-lldp.c
> @@ -619,7 +619,6 @@ aa_mapping_unregister(void *aux)
> }
>
> hmap_remove(&lldp->mappings_by_aux, &m->hmap_node_aux);
> - free(m);
>
> /* Remove from all the lldp instances */
> LIST_FOR_EACH (hw, h_entries, &lldp->lldpd->g_hardware) {
> @@ -629,6 +628,7 @@ aa_mapping_unregister(void *aux)
>
> aa_mapping_unregister_mapping(lldp, hw, m);
> }
> + free(m);
>
> /* Remove from the all_mappings */
> HMAP_FOR_EACH (m, hmap_node_isid, all_mappings) {
> --
> 2.1.3
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
More information about the dev
mailing list