dpif: Only clear 'all_dps' argument in dp_enumerate().
authorJustin Pettit <jpettit@nicira.com>
Fri, 7 Aug 2009 18:09:56 +0000 (11:09 -0700)
committerJustin Pettit <jpettit@nicira.com>
Fri, 7 Aug 2009 18:16:06 +0000 (11:16 -0700)
commitd2a345699f3951029941d01c7f1bf008d706ad20
treefbd639cd7a0a44c8e57138f286d9537e7b314ca5
parent5146acb1408da035504163af23b2a554ff479800
dpif: Only clear 'all_dps' argument in dp_enumerate().

Originally, the function dp_enumerate() initialized the 'all_dps'
argument.  This is inconsistent with most other functions that take an
svec argument, which would only clear the contents.  Further, if someone
were not careful when reusing the svec, it could lead to memory leaks.
With this change, the caller is expected to first call svec_init() on
the argument.
lib/dpif.c
vswitchd/bridge.c