In "crash-1" loop, the snep_data was added to the slist, but not removed
because of a specific exit condition. This fix swaps the test condition
and the action on slist, in order to add the fragment only when the length
test passed.
if (stored_recd)
TEST_SNEP_LOG("\tdummy_req_put already stored record\n");
- test_fragments = g_slist_append(test_fragments, snep_data);
-
if (snep_data->nfc_data_length > snep_data->nfc_data_current_length)
return TRUE;
+ test_fragments = g_slist_append(test_fragments, snep_data);
+
nfc_data_length = 0;
nfc_data = g_try_malloc0(snep_data->nfc_data_length);
g_assert(nfc_data != NULL);