From patchwork Tue Apr 8 20:49:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 3951001 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BEC219F499 for ; Tue, 8 Apr 2014 20:50:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1624420483 for ; Tue, 8 Apr 2014 20:50:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0D69F204AF for ; Tue, 8 Apr 2014 20:50:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F7656E888; Tue, 8 Apr 2014 13:50:40 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) by gabe.freedesktop.org (Postfix) with ESMTP id C148D6E874 for ; Tue, 8 Apr 2014 13:50:38 -0700 (PDT) Received: by mail-bk0-f53.google.com with SMTP id r7so1310525bkg.12 for ; Tue, 08 Apr 2014 13:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=qKyxET9XSHnDbGHnS7dvYq3SdZtcN8LrUdU5fFDc7jw=; b=dFjVgbYCUj48Mn0vFpkMuALWvq1TadaSdVjnxLcHt4UcSuE9P8Zud5Q5XQxVC/R5Mk WxK58j1QQw2HT6vR7N1BQb+jxka3aeFsd3lD0YHsts9S3b93+brSDLfqDJAMa2ZlSzGY 9iQ4taaTLapm2vCO3D4wgNWhx6gJuzOR7B460TTQkg4LWGBUmwVfio2E8B9SrtYC7EBA s4ubw4yFRkbOLmiQXTffbWSVnp1uHW415Axf+eYlYQ3phIan6Z2HZQ+EdkdorTfiy+Gv 42FfrDLP4HQl1bc8z/BjGABI+1txgPXreTUHZXd0nExXcNiuMfLLoyXBcaBuQ4nWXR7n zrTA== X-Received: by 10.204.96.196 with SMTP id i4mr5221196bkn.17.1396990237954; Tue, 08 Apr 2014 13:50:37 -0700 (PDT) Received: from localhost (port-92459.pppoe.wtnet.de. [84.46.73.165]) by mx.google.com with ESMTPSA id rk5sm3733034bkb.6.2014.04.08.13.50.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Apr 2014 13:50:37 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 4/4] tests: Use drmFreeVersion() instead of drmFree() Date: Tue, 8 Apr 2014 22:49:38 +0200 Message-Id: <1396990178-32470-5-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1396990178-32470-1-git-send-email-thierry.reding@gmail.com> References: <1396990178-32470-1-git-send-email-thierry.reding@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding drmFreeVersion() frees the memory allocated for the name, date and desc fields in addition to that for the struct _drmVersion. Signed-off-by: Thierry Reding --- tests/getversion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/getversion.c b/tests/getversion.c index 53d1d354ea16..bcec46999140 100644 --- a/tests/getversion.c +++ b/tests/getversion.c @@ -43,7 +43,7 @@ int main(int argc, char **argv) assert(strlen(v->desc) != 0); if (strcmp(v->name, "i915") == 0) assert(v->version_major >= 1); - drmFree(v); + drmFreeVersion(v); close(fd); return 0; }