From patchwork Wed Jun 28 00:35:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 781429 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 3wy3jn1hz5z9s0g for ; Wed, 28 Jun 2017 10:35:41 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 0BE99AD9; Wed, 28 Jun 2017 00:35:38 +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 740FE71F for ; Wed, 28 Jun 2017 00:35:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id CC6B11BB for ; Wed, 28 Jun 2017 00:35:35 +0000 (UTC) Received: from mfilter14-d.gandi.net (mfilter14-d.gandi.net [217.70.178.142]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id BDB41FB883 for ; Wed, 28 Jun 2017 02:35:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter14-d.gandi.net Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter14-d.gandi.net (mfilter14-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id pcB9zDQnWQji for ; Wed, 28 Jun 2017 02:35:33 +0200 (CEST) X-Originating-IP: 208.91.1.34 Received: from sc9-mailhost2.vmware.com (unknown [208.91.1.34]) (Authenticated sender: jpettit@ovn.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id D49C3FB87D for ; Wed, 28 Jun 2017 02:35:32 +0200 (CEST) From: Justin Pettit To: dev@openvswitch.org Date: Tue, 27 Jun 2017 17:35:29 -0700 Message-Id: <1498610129-32658-2-git-send-email-jpettit@ovn.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498610129-32658-1-git-send-email-jpettit@ovn.org> References: <1498610129-32658-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] [PATCH 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 --- 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,