From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 5CC0C7803D8 for ; Thu, 3 Aug 2023 10:17:05 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LeHgrF16TlwL4J93jIVzCRfic2zMZspYyKJjFm8WVY8=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1691057823; v=1; b=kRbXczkOKtfEwmMPVqjRCgvowwwBkBLpWZitVevoL2ouj844luqmTzMBw3CDMYUTK6OhFMa1 8+UYJZg/wY23zfeLbWMYXlAb4dXZKVN/Nk5C1iqrrHbuq61mCjOoDbekYrytQQ68xwf30a0hIlb qXvWIj5sc6SZ4oasUzw/7nOk= X-Received: by 127.0.0.2 with SMTP id FcCxYY7687511xZFbMlX6q4Z; Thu, 03 Aug 2023 03:17:03 -0700 X-Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) by mx.groups.io with SMTP id smtpd.web10.10979.1691057823336156232 for ; Thu, 03 Aug 2023 03:17:03 -0700 X-Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-583e91891aeso7799217b3.1 for ; Thu, 03 Aug 2023 03:17:03 -0700 (PDT) X-Gm-Message-State: SNxwR4Pc9ghzFDFRluXHeLUpx7686176AA= X-Google-Smtp-Source: APBJJlFdCjM26zjHzUHKsk0+eXvh30UZKnuatRxxMAh4DXIUmYQiC0CkkHP1O9n+TSnL0WFYbGJnYLJHFIb0NvrqFMg= X-Received: by 2002:a25:add3:0:b0:d16:d1d8:4dd7 with SMTP id d19-20020a25add3000000b00d16d1d84dd7mr17645890ybe.4.1691057822409; Thu, 03 Aug 2023 03:17:02 -0700 (PDT) MIME-Version: 1.0 References: <20230722081826.301-1-nicklew@nvidia.com> In-Reply-To: From: "Mike Maslenkin" Date: Thu, 3 Aug 2023 13:16:26 +0300 Message-ID: Subject: Re: [edk2-devel] [PATCH] RedfishPkg/RedfishRestExDxe: return HTTP status code to caller. To: Nickle Wang Cc: "devel@edk2.groups.io" , Abner Chang , Igor Kulchytskyy , Nick Ramirez Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=kRbXczkO; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Yes. I suggest not to release ResponseMessage->Body There is a function RestConfigFreeHttpMessage releasing Message->Body as well as Message->Data.Response https://github.com/tianocore/edk2/blob/master/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c#L134 called from: https://github.com/tianocore/edk2/blob/master/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c#L555 https://github.com/tianocore/edk2/blob/master/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c#L734 https://github.com/tianocore/edk2/blob/master/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c#L921 https://github.com/tianocore/edk2/blob/master/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c#L1080 So I guess RestConfigFreeHttpMessage() makes a proper resource deallocation otherwise patch introduces a memory leak for error handling path, for example here: https://github.com/tianocore/edk2/blob/master/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c#L429 and https://github.com/tianocore/edk2/blob/master/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c#L364 and so on. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107529): https://edk2.groups.io/g/devel/message/107529 Mute This Topic: https://groups.io/mt/100292372/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-