openvswitch: small potential memory leak in ovs_vport_alloc()
Subsystems (4)
PATCH 1/1 openvswitch: small potential memory leak in ovs_vport_alloc()
We're unlikely to hit this leak, but the static checkers complain if we don't take care of it.
Signed-off-by Dan Carpenter <[email protected]>
net/openvswitch/vport.c +3 -1
@@ -127,8 +127,10 @@ struct vport *ovs_vport_alloc(int priv_size, const struct vport_ops *ops, vport->ops = ops; vport->percpu_stats = alloc_percpu(struct vport_percpu_stats); -if (!vport->percpu_stats) +if (!vport->percpu_stats) { +kfree (vport);return ERR_PTR (-ENOMEM ); + }spin_lock_init (&vport->stats_lock);
A message that is not in the archive (sent off-list or not yet received): [email protected]
Jesse Gross
Acked-byQuoted 4 lines · Dan Carpenter
We're unlikely to hit this leak, but the static checkers complain if we don't take care of it.
Signed-off-by Dan Carpenter <[email protected]>
Acked-by Jesse Gross <[email protected]>
Thanks Dan.
A message that is not in the archive (sent off-list or not yet received): CAEP_g=_McLiPzKMM-9PGqddsYe7q6jYkCyAJcE1MU=Q4_Fou4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
David Miller
AppliedFrom: Jesse Gross <[email protected]>
Date: Tue, 6 Dec 2011 09:32:13 -0800
Quoted 7 lines · Dan Carpenter
Quoted 4 lines
We're unlikely to hit this leak, but the static checkers complain if we don't take care of it.
Signed-off-by Dan Carpenter <[email protected]>Acked-by Jesse Gross <[email protected]>
Applied, thanks.