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 <[email protected]> --- v1->v2: Unchanged. --- lib/ofp-parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
