From patchwork Tue Mar 17 23:31:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 1257024 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=RcKpnqfH; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48hqG86nLjz9sPR for ; Wed, 18 Mar 2020 10:32:32 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DB98888C6E; Tue, 17 Mar 2020 23:32:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DRMnoXYaHG07; Tue, 17 Mar 2020 23:32:29 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id A36FC88C17; Tue, 17 Mar 2020 23:32:29 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8C7F4C1D74; Tue, 17 Mar 2020 23:32:29 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 592EDC1D85 for ; Tue, 17 Mar 2020 23:32:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4CFEB88607 for ; Tue, 17 Mar 2020 23:32:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ufdvsbgcB-2x for ; Tue, 17 Mar 2020 23:32:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id ABDE8877BF for ; Tue, 17 Mar 2020 23:32:27 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id v13so455365pjb.0 for ; Tue, 17 Mar 2020 16:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hY6H9R4GqwXWIPbEVifM9nMISPMGitMQC7O82CmJ5CQ=; b=RcKpnqfHwKV+/DpzUWfGSzgXmKQgXz6NTziIpZTP0OyYpZ/wpKTI51b3LL5flEKsao EIvTC3FbnKae5EZ55tkGNAoMLoHpcnBS+vXVKZiS2xCYJke4d/Mia0nG1O5AjbwgVlVe TyrQkQrvkaSeIrheXGdZd4xTrXkuukaiZuNUWwODdxfDFaT1UDpqa7RZv2cNWE7/KPgM oTl6kBRg6czBbTJQPxCjG1nd0UOoDU3QHv+atcNPYsvAHdqogrH1dIg1Zv1xylxJdBZE mffE7ykR4LSNyyB8dOgj3Xmf8/aL9/38PrxDZHliiqCp5H9jt/KyM1KBnHQY9SO3jheN 09fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hY6H9R4GqwXWIPbEVifM9nMISPMGitMQC7O82CmJ5CQ=; b=cklPbmzXIpfiKk562jjfJvAnEeauvKALqNGDw9kS1npOXbVUgRur9lUFG53/Hh8jGq lcRGxfmlRJjs2TDNlwExvMCh8t6woW5FuNwZWiPvmL5bl04bs1Ro/tbyCoKbvtKdtv3k XVq6PIV/waqxqyojgiSC5mOeWkXW+LsLcxNYRt7HMYDfU6hKVfyUb8BZhhmTa452VgB2 y4hpJPgwjVj+OGDnRDx0AQCqIkfxX5Zcsysy+ZypEYn+27sWTMKEX2s29CjtCiAJcXnK ue6T5e1nHElzcvEEqLSsUGAqru46A46QLV98HusdJyEplmJxBFXj4qsiqxTwE+XevSZh hkxw== X-Gm-Message-State: ANhLgQ3f9um0dFT1LH3tFki3/ss3tzfIaPZE3BR2iwsYsRtTJgb9wfEg GgC82nurrvffruGNivWhoKoFsSPh X-Google-Smtp-Source: ADFU+vua0L5Di8t6Gu3UEvDUMFdVSQ0llmEO4HBOXOPbPCSCgRhAVzUi88HoTzrYpSj9AyEnxvjI/A== X-Received: by 2002:a17:902:bc47:: with SMTP id t7mr1106521plz.47.1584487946989; Tue, 17 Mar 2020 16:32:26 -0700 (PDT) Received: from sc9-mailhost2.vmware.com (c-76-21-95-192.hsd1.ca.comcast.net. [76.21.95.192]) by smtp.gmail.com with ESMTPSA id d14sm3260262pfq.29.2020.03.17.16.32.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Mar 2020 16:32:25 -0700 (PDT) From: William Tu To: dev@openvswitch.org Date: Tue, 17 Mar 2020 16:31:55 -0700 Message-Id: <1584487915-19859-2-git-send-email-u9012063@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584487915-19859-1-git-send-email-u9012063@gmail.com> References: <1584487915-19859-1-git-send-email-u9012063@gmail.com> Subject: [ovs-dev] [PATCH] ofp-actions: Fix memory leak. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Coverity CID 279274 reports leaking previously allocated 'error' buffer when 'return xasprintf("input too big");'. Cc: Usman Ansari Signed-off-by: William Tu Reviewed-by: Greg Rose --- lib/ofp-actions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index ddef3b0c8780..ef8b2b4527f9 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -6657,6 +6657,7 @@ parse_CT(char *arg, const struct ofpact_parse_params *pp) } if (ofpbuf_oversized(pp->ofpacts)) { + free(error); return xasprintf("input too big"); }