libpurple/request.c

changeset 36047
2d7d55acd82c
parent 35597
7fcfcf147b99
child 37624
a61e614c743d
--- a/libpurple/request.c	Thu May 15 21:11:02 2014 +0200
+++ b/libpurple/request.c	Thu May 15 23:02:22 2014 +0200
@@ -959,10 +959,12 @@
 			while (it != NULL) {
 				g_free(it->data);
 				it = g_list_next(it); /* value */
+				if (it == NULL) {
+					g_warn_if_reached();
+					break;
+				}
 				if (it->data && field->u.choice.data_destroy)
 					field->u.choice.data_destroy(it->data);
-				if (it == NULL)
-					break;
 				it = g_list_next(it); /* next label */
 			}
 			g_list_free(field->u.choice.elements);

mercurial