From d76df4c1398324170f306fc3f28b7910d6972ccc Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 2 Aug 2019 09:30:33 +0200 Subject: [PATCH] shared: try avoid coverity warning in _nm_utils_user_data_unpack() Coverity says CID 202453 (#1 of 1): Wrong sizeof argument (SIZEOF_MISMATCH)suspicious_sizeof: Passing argument user_data of type gconstpointer and argument (gsize)nargs * 8UL /* sizeof (gconstpointer) */ to function g_slice_free1 is suspicious. Let's pass instead the "data" pointer. It's the same, but maybe that avoids the warning. --- shared/nm-glib-aux/nm-shared-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/nm-glib-aux/nm-shared-utils.c b/shared/nm-glib-aux/nm-shared-utils.c index b2ec547092..33749d3a1c 100644 --- a/shared/nm-glib-aux/nm-shared-utils.c +++ b/shared/nm-glib-aux/nm-shared-utils.c @@ -2878,7 +2878,7 @@ _nm_utils_user_data_unpack (gpointer user_data, int nargs, ...) } va_end (ap); - g_slice_free1 (((gsize) nargs) * sizeof (gconstpointer), user_data); + g_slice_free1 (((gsize) nargs) * sizeof (gconstpointer), data); } /*****************************************************************************/