grim/testing

Fix some issues scanbuild found in novell
release-2.x.y
2021-06-01, Gary Kramlich
b3c69b679399
Parents 85104fd731b5
Children 08b79a9a0ad2
Fix some issues scanbuild found in novell

Testing Done:
Verified scanbuild no longer detected an error.

Reviewed at https://reviews.imfreedom.org/r/703/
--- a/libpurple/protocols/novell/nmuser.c Tue Jun 01 20:20:21 2021 -0500
+++ b/libpurple/protocols/novell/nmuser.c Tue Jun 01 20:21:04 2021 -0500
@@ -1525,8 +1525,9 @@
for (node = list; node; node = node->next) {
if (nm_utf8_str_equal(nm_user_record_get_dn(user_record),
(const char *) node->data)) {
- g_free(node->data);
+ gpointer data = node->data;
list = g_slist_remove(list, node->data);
+ g_free(data);
nm_request_set_user_define(request, list);
break;
}