We could have *list_size == 0, and in that case we would -wrongly- think that we are out of memory, as g_try_new0() would return NULL. We should take into account that case, returning some recognizable value to the caller.