From: Giuseppe Lettieri Date: Sun, 16 Sep 2012 12:17:43 +0000 (+0200) Subject: fix memory leak X-Git-Tag: sliver-openvswitch-1.8.90-0~14 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=98961fbbf74e640ae1ec8a0c9e3e75bbfa324957;p=sliver-openvswitch.git fix memory leak Signed-off-by: Giuseppe Lettieri --- diff --git a/lib/netdev-tunnel.c b/lib/netdev-tunnel.c index d2318dbd1..a64d0b246 100644 --- a/lib/netdev-tunnel.c +++ b/lib/netdev-tunnel.c @@ -169,11 +169,11 @@ netdev_tunnel_get_config(struct netdev_dev *dev_, struct smap *args) struct netdev_dev_tunnel *netdev_dev = netdev_dev_tunnel_cast(dev_); if (netdev_dev->valid_remote_ip) - smap_add(args, "remote_ip", - xasprintf(IP_FMT, IP_ARGS(&netdev_dev->remote_addr.sin_addr))); + smap_add_format(args, "remote_ip", IP_FMT, + IP_ARGS(&netdev_dev->remote_addr.sin_addr)); if (netdev_dev->valid_remote_port) - smap_add(args, "remote_port", - xasprintf("%"PRIu16, ntohs(netdev_dev->remote_addr.sin_port))); + smap_add_format(args, "remote_port", "%"PRIu16, + ntohs(netdev_dev->remote_addr.sin_port)); return 0; }