[PATCH libdrm] tests: Use drmFreeVersion() instead of drmFree()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Thierry Reding <treding@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 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

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux