From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CFD71A0547 for ; Thu, 24 Jun 2021 15:25:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA22B4003C; Thu, 24 Jun 2021 15:25:08 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 65C554003C for ; Thu, 24 Jun 2021 15:25:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624541106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5wHfkWtfS6dcrYG9v1Eza2LYH6nnngz79qYa7mE+XXo=; b=NisUGFKfNZXrvF1BSBxIeQybdyqPP1SEuFFiomdnDvIkoBSIK73sE6qmXvtZlsnCbWT7KG bq2lpH8wLGXeS8GTlNM4hZoQB7k/8ulkoyvv6Gqui8bQiQYpkjLsiKMvM8Tn+tlgqiJatX 2OxCemYl7I9+z84UnvLXtm5CpdftJ30= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-353-P7RF_vbVPYq3DRM3PmfQAQ-1; Thu, 24 Jun 2021 09:25:05 -0400 X-MC-Unique: P7RF_vbVPYq3DRM3PmfQAQ-1 Received: by mail-vk1-f200.google.com with SMTP id m5-20020ac5cfc50000b0290249866b3a41so1900996vkf.19 for ; Thu, 24 Jun 2021 06:25:05 -0700 (PDT) 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=5wHfkWtfS6dcrYG9v1Eza2LYH6nnngz79qYa7mE+XXo=; b=azKoyGNohmoIxZ8frlbSUUKyjzjcXLmJCN7r33vjKOn+pjE6kC9srGgNN1wTPiOVjv 3nLCCRcuwOkWCnfOSqG/DYxcpxY9TooqE700CYPNEJmRCMUvQDWy3PNARaKtlH7HrfcZ /xwdQU/vPW6FHkc7Tw0tsNx+JpMtr//+YS2HUR2V6Hkp0XD6zIOLMjp1N69KX0RAdI4U 81oygRFKIiEFSOvFZLNHr5f+cpn5xErihnoecJELbQm2Cja1knV1zD36whe6qI/Ac5Vg 1vcO/P5n8ohGQjyPAaEWNmvfggGCu+Sj2rTjCNFGCHXoYycgcNgSEDkB6vECfoleTdn5 2YGQ== X-Gm-Message-State: AOAM531jf/eJalRyE7h79iQg63Nh4GXU0j7Wyw3/oV9HZ+uH1VKNtc9S OcG3FiMKwQ4r9rM408tMi8WNC+dWgoDMJsJFFgoJW0JJA8rzt3hNPuNSKNO2n+PWPa2Uz+/oXFh DebQbvluukeIOVeAd9h+a9oM= X-Received: by 2002:a1f:2e86:: with SMTP id u128mr2643192vku.22.1624541104817; Thu, 24 Jun 2021 06:25:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwO7pefK50157m+uI0lMalFGDx1KixI7NphkPx8dD7XeXTIhVpn1OrdBy2C4WIB6tij+ppSSUwmv+R9iOhaR8k= X-Received: by 2002:a1f:2e86:: with SMTP id u128mr2643173vku.22.1624541104672; Thu, 24 Jun 2021 06:25:04 -0700 (PDT) MIME-Version: 1.0 References: <20210616180724.355217-1-ohilyard@iol.unh.edu> <20210623180645.91942-1-ohilyard@iol.unh.edu> In-Reply-To: From: David Marchand Date: Thu, 24 Jun 2021 15:24:53 +0200 Message-ID: To: Olivier Matz Cc: Owen Hilyard , dev , dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH v3] tests/cmdline: fix memory leaks X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Thu, Jun 24, 2021 at 2:08 PM Olivier Matz wrote: > > - if (cmdline_file_new(&ctx, "prompt", "/dev/null") == NULL) { > > + cl = cmdline_file_new(&ctx, "prompt", "/dev/null"); > > + if (cl == NULL) { > > printf("Error: failed to open /dev/null for reading!"); > > + cmdline_free(cl); > > return -1; > > } > > The cmdline_free(cl) after a if (cl == NULL) is not needed. I took the liberty of doing the change when applying and added your ack. Thanks. -- David Marchand