summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-08-02 09:30:33 +0200
committerThomas Haller <thaller@redhat.com>2019-08-02 09:30:35 +0200
commitd76df4c1398324170f306fc3f28b7910d6972ccc (patch)
tree365bf2a256681494f9bfedfed787664b81b2e0f8
parente6fa3ce2dfd45ef3556b31b8f51c88a78c4e4ce4 (diff)
downloadNetworkManager-d76df4c1398324170f306fc3f28b7910d6972ccc.tar.gz
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.
-rw-r--r--shared/nm-glib-aux/nm-shared-utils.c2
1 files changed, 1 insertions, 1 deletions
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);
}
/*****************************************************************************/