From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5BCDFA00C3; Fri, 15 May 2020 09:05:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4A8AE1DA26; Fri, 15 May 2020 09:05:32 +0200 (CEST) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id 9F16C1DA19 for ; Fri, 15 May 2020 09:05:30 +0200 (CEST) Received: by mail-io1-f65.google.com with SMTP id x5so1545475ioh.6 for ; Fri, 15 May 2020 00:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Bnhy6EG5IFdsPBfGLdBqjkMtOb+CIGJxjewVVS703Zw=; b=kuNxLBfsB8WTo7aTEJMWiAC+KcGEhP2X7Bbb+2o6ssOgej0dJ6HHMmqzlclUk9Yepf RnEZwkBHv9sb91hksQXBXtgbqeb2Ca4/WfC7+zpq/df/1KV/2hPh6PBm8r4C+zUT8Suw K6HbhheI2jeXShIZkmv1Q/SoLoRSe4kgMCHMSIiP7Ke9lBNBUjyzn2/wB9LHtXv7eBj6 8BZwbTgM8uxCJXne2C2LJsVYmkaoxCnqNPuj77m8a2w708kbrjXNsHzuhdXEZQGFkGwV rqDv2lJdWnKxwZWHKemFeQFaPsmE62PhAk0zRDP2ix059ZfBNPnOdg0LLantmX6JG2ad p0Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Bnhy6EG5IFdsPBfGLdBqjkMtOb+CIGJxjewVVS703Zw=; b=MkVywdJ4c+aguUcqtC8YKGKakHV0P1fATwmLFRKnmklCmfkxFjCNeL5GBVCLAToXR+ 0razlgNIRYSeLJQc9lPRDQrUaGeP6mPRJrGwyWeJD2f6VxD+YGGTSBNsDPSQhXgHsgIq DiM5EM/nlijMgUjO6Sr9+8QIEclPxbcS58o7RY14kwxX4XQ/nVOW2OALZcpCLUbr12Y0 ZY9kjHfVXYNQ1+2cwhVEQwZaOGEfmls7V7z+LleP+y+sc3HjPAezWOXtVivSOFPXxefl piv3kNu7jWs2f5ucBrw/u282U5lhmsMLQHsLfPZmarRW2Q9klX1/AVTt2u2sizkZ31pW 99KA== X-Gm-Message-State: AOAM530PXd6dypj1eUNEo8QwzU52YFItKsjuNNbO6pbEoY4zjDsdL+R8 +LtCYM9F30vw/Rmzj/NBcUtM0MkwSdQHdgAXtV0= X-Google-Smtp-Source: ABdhPJxf6Id/CNl2zpc4Rczq1CxoRn2ArAdH9fbVpnkUa9sA/glq6rFp+3UZGuUtreLkO/ohMvxL+hKtN7inSGXJIeY= X-Received: by 2002:a5e:8411:: with SMTP id h17mr1692731ioj.1.1589526329828; Fri, 15 May 2020 00:05:29 -0700 (PDT) MIME-Version: 1.0 References: <20200514090750.14170-1-kirankumark@marvell.com> <20200514112436.29766-1-kirankumark@marvell.com> In-Reply-To: <20200514112436.29766-1-kirankumark@marvell.com> From: Jerin Jacob Date: Fri, 15 May 2020 12:35:13 +0530 Message-ID: To: Kiran Kumar K , David Marchand Cc: Jerin Jacob , Nithin Dabilpuram , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3] test/graph: fix coverity issues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, May 14, 2020 at 4:56 PM wrote: > > From: Kiran Kumar K > > Fix memory leak and weak crypto issues reported by coverity. > > Coverity issue: 358439, 358448, 358451 > Fixes: 6b89650418("test/graph: add functional tests") Space is missing before the opening bracket due to that checkpatch is failing. With above change: Acked-by: Jerin Jacob > > Signed-off-by: Kiran Kumar K > --- > app/test/test_graph.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/app/test/test_graph.c b/app/test/test_graph.c > index cf6df0744..ed69eda99 100644 > --- a/app/test/test_graph.c > +++ b/app/test/test_graph.c > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include > > #include "test.h" > > @@ -145,7 +146,7 @@ uint16_t > test_node_worker_source(struct rte_graph *graph, struct rte_node *node, > void **objs, uint16_t nb_objs) > { > - uint32_t obj_node0 = rand() % 100, obj_node1; > + uint32_t obj_node0 = rte_rand() % 100, obj_node1; > test_main_t *tm = &test_main; > struct rte_mbuf *data; > void **next_stream; > @@ -193,7 +194,7 @@ test_node0_worker(struct rte_graph *graph, struct rte_node *node, void **objs, > test_main_t *tm = &test_main; > > if (*(uint32_t *)node->ctx == test_node0.id) { > - uint32_t obj_node0 = rand() % 100, obj_node1; > + uint32_t obj_node0 = rte_rand() % 100, obj_node1; > struct rte_mbuf *data; > uint8_t second_pass = 0; > uint32_t count = 0; > @@ -496,6 +497,7 @@ test_lookup_functions(void) > printf("Test number of edges for node = %s failed Expected = %d, got %d\n", > tm->test_node[i].node.name, > tm->test_node[i].node.nb_edges, count); > + free(next_edges); > return -1; > } > > @@ -505,6 +507,7 @@ test_lookup_functions(void) > printf("Edge name miss match, expected = %s got = %s\n", > tm->test_node[i].node.next_nodes[j], > next_edges[j]); > + free(next_edges); > return -1; > } > } > -- > 2.17.1 >