[ovs-dev,2/2] ofp-parse: Improve comment for parse_ofp_packet_out_str().
diff mbox

Message ID 1498610129-32658-2-git-send-email-jpettit@ovn.org
State Accepted
Headers show

Commit Message

Justin Pettit June 28, 2017, 12:35 a.m. UTC
This function is a wrapper for parse_ofp_packet_out_str__(), which
states that a couple members must be freed on success.  This commit
updates the wrapper's description to indicate the same.

The existing callers appear to be properly freeing members.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
---
 lib/ofp-parse.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch
diff mbox

diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
index 725fc41e063c..0c68495bfd3e 100644
--- a/lib/ofp-parse.c
+++ b/lib/ofp-parse.c
@@ -735,7 +735,9 @@  out:
  * switch.  Returns the set of usable protocols in '*usable_protocols'.
  *
  * Returns NULL if successful, otherwise a malloc()'d string describing the
- * error.  The caller is responsible for freeing the returned string. */
+ * error.  The caller is responsible for freeing the returned string.
+ * If successful, both 'po->ofpacts' and 'po->packet' must be free()d by
+ * the caller. */
 char * OVS_WARN_UNUSED_RESULT
 parse_ofp_packet_out_str(struct ofputil_packet_out *po, const char *str_,
                          const struct ofputil_port_map *port_map,