lkml.org 
[lkml]   [2019]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs
From
Date
> @@ -433,6 +435,7 @@ nfp_flower_spawn_vnic_reprs(struct nfp_app *app,
> err = nfp_repr_init(app, repr,
> port_id, port, priv->nn->dp.netdev);
> if (err) {
> + kfree(repr_priv);
> nfp_port_free(port);
> nfp_repr_free(repr);
> goto err_reprs_clean;

How do you think about to move common exception handling code
to the end of this function implementation by using another jump target?

Regards,
Markus

\
 
 \ /
  Last update: 2019-09-27 16:07    [W:0.035 / U:1.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site