vxlan: fix a potential issue when create a new vxlan fdb entry.

commit 17b463654f upstream.

vxlan_fdb_append may return error, so add the proper check,
otherwise it will cause memory leak.

Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>

Changes in v2:
  - Unnecessary to initialize rc to zero.
Acked-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Haishuang Yan 2016-11-29 09:59:36 +08:00 • committed by Ben Hutchings
commit 189d83e81a