From patchwork Wed Jun 28 01:14:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 781433 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wy4bj57YWz9s2s for ; Wed, 28 Jun 2017 11:15:29 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B3928AA6; Wed, 28 Jun 2017 01:14:54 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id B403AA92 for ; Wed, 28 Jun 2017 01:14:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 4627918A for ; Wed, 28 Jun 2017 01:14:50 +0000 (UTC) Received: from mfilter14-d.gandi.net (mfilter14-d.gandi.net [217.70.178.142]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 15A7E1720A4 for ; Wed, 28 Jun 2017 03:14:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter14-d.gandi.net Received: from relay4-d.mail.gandi.net ([IPv6:::ffff:217.70.183.196]) by mfilter14-d.gandi.net (mfilter14-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id i15I0paIictv for ; Wed, 28 Jun 2017 03:14:47 +0200 (CEST) X-Originating-IP: 208.91.1.34 Received: from sc9-mailhost1.vmware.com (unknown [208.91.1.34]) (Authenticated sender: jpettit@ovn.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id EC19617209B for ; Wed, 28 Jun 2017 03:14:46 +0200 (CEST) From: Justin Pettit To: dev@openvswitch.org Date: Tue, 27 Jun 2017 18:14:44 -0700 Message-Id: <1498612484-60128-2-git-send-email-jpettit@ovn.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498612484-60128-1-git-send-email-jpettit@ovn.org> References: <1498612484-60128-1-git-send-email-jpettit@ovn.org> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCHv2 2/2] ofp-parse: Improve comment for parse_ofp_packet_out_str(). X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org 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 Acked-by: Ben Pfaff --- 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,