device->matches is an array of pointers.

Found by coverity.

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 libwacom/libwacom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
index 6d24946..339edb4 100644
--- a/libwacom/libwacom.c
+++ b/libwacom/libwacom.c
@@ -794,7 +794,7 @@ libwacom_update_match(WacomDevice *device, WacomBusType 
bus, int vendor_id, int
 
        device->nmatches++;
 
-       device->matches = g_realloc_n(device->matches, device->nmatches + 1, 
sizeof(WacomMatch));
+       device->matches = g_realloc_n(device->matches, device->nmatches + 1, 
sizeof(WacomMatch*));
        device->matches[device->nmatches] = NULL;
        device->matches[device->nmatches - 1] = libwacom_copy_match(&match);
        device->match = device->nmatches - 1;
-- 
2.1.0


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to