All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libdrm] tests: Use drmFreeVersion() instead of drmFree()
@ 2014-02-19 15:42 Thierry Reding
  2014-02-19 19:33 ` Eric Anholt
  0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2014-02-19 15:42 UTC (permalink / raw)
  To: dri-devel

From: Thierry Reding <treding@nvidia.com>

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 <treding@nvidia.com>
---
 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;
 }
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH libdrm] tests: Use drmFreeVersion() instead of drmFree()
  2014-02-19 15:42 [PATCH libdrm] tests: Use drmFreeVersion() instead of drmFree() Thierry Reding
@ 2014-02-19 19:33 ` Eric Anholt
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Anholt @ 2014-02-19 19:33 UTC (permalink / raw)
  To: Thierry Reding, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 327 bytes --]

Thierry Reding <thierry.reding@gmail.com> writes:

> From: Thierry Reding <treding@nvidia.com>
>
> 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 <treding@nvidia.com>

Reviewed-by: Eric Anholt <eric@anholt.net>

[-- Attachment #1.2: Type: application/pgp-signature, Size: 818 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-19 19:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-19 15:42 [PATCH libdrm] tests: Use drmFreeVersion() instead of drmFree() Thierry Reding
2014-02-19 19:33 ` Eric Anholt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.