From patchwork Wed Feb 19 15:42:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 3681951 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 5AE289F2EC for ; Wed, 19 Feb 2014 15:43:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B7D92010F for ; Wed, 19 Feb 2014 15:43:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CD678200ED for ; Wed, 19 Feb 2014 15:43:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C76AFADAE; Wed, 19 Feb 2014 07:43:10 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by gabe.freedesktop.org (Postfix) with ESMTP id ED262FADAD for ; Wed, 19 Feb 2014 07:43:00 -0800 (PST) Received: by mail-bk0-f44.google.com with SMTP id r7so263557bkg.3 for ; Wed, 19 Feb 2014 07:42:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=NLThqnzhHjX8jdfGJTKvHihhgQgp7EDXVAa+6TD1T8s=; b=eEuRBi7FRGWyAnSqFLQ04KoaoO6xbduLK4LTnOUasvOJ2hUcyeGhFWthG9ixOTPsx3 YHgK1mhqRy89NOP4GI24yvkZHvvbi6ZLfrPfrxeDoFFo3rLIsz+30O758giBMld0ZbRN ejhcrSdYlpDFJUQX2cNz4yS9oltRlI62Vu55KbdFY05syTeEEJCOIneuYHmKq2sv/7ta s9fN3guqdoiT+4Eaol2fXEcwhVwOVbGy7P3ne2EhzYhi+MBVRkdadta/XA/QGb2AQ+gy kGFa+4xp/S3o+WmYYGOkitX5JrPeaBpGIzHskrpn6dhZhHvjHXCOlinttfEmgJNR0zpM 4Ieg== X-Received: by 10.204.178.13 with SMTP id bk13mr482257bkb.74.1392824579467; Wed, 19 Feb 2014 07:42:59 -0800 (PST) Received: from localhost (port-25108.pppoe.wtnet.de. [46.59.159.204]) by mx.google.com with ESMTPSA id mc2sm851709bkb.12.2014.02.19.07.42.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Feb 2014 07:42:58 -0800 (PST) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] tests: Use drmFreeVersion() instead of drmFree() Date: Wed, 19 Feb 2014 16:42:55 +0100 Message-Id: <1392824575-7064-2-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 1.8.4.2 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 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 Reviewed-by: Eric Anholt --- 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; }