summaryrefslogtreecommitdiff
path: root/lib/netdev-vport.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2013-07-31 14:09:30 -0700
committerBen Pfaff <blp@nicira.com>2013-08-09 21:23:19 -0700
commit161b6042d853f54e609415a671aaebe859ee94a2 (patch)
treedebecfcb12690abeee31d14dc4f1eb8610bbb83f /lib/netdev-vport.h
parent9dc63482bbeae23dd57b0f885a3fd26b44656844 (diff)
downloadopenvswitch-161b6042d853f54e609415a671aaebe859ee94a2.tar.gz
netdev-vport: Make netdev_vport_patch_peer() return a malloc()'d string.
When threading comes into the picture there arises the possibility of a race between netdev_vport_patch_peer()'s caller using the returned string and another caller changing the peer. It is safer to return a copy. Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/netdev-vport.h')
-rw-r--r--lib/netdev-vport.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/netdev-vport.h b/lib/netdev-vport.h
index 53949666e..dc490970c 100644
--- a/lib/netdev-vport.h
+++ b/lib/netdev-vport.h
@@ -31,7 +31,7 @@ void netdev_vport_patch_register(void);
bool netdev_vport_is_patch(const struct netdev *);
-const char *netdev_vport_patch_peer(const struct netdev *netdev);
+char *netdev_vport_patch_peer(const struct netdev *netdev);
void netdev_vport_inc_rx(const struct netdev *,
const struct dpif_flow_stats *);