- if (array == NULL) { /* this is the first time the function is called */
- array = xbt_new0(SD_link_t, sd_global->link_count);
+ if (sd_global->link_list == NULL) { /* this is the first time the function is called */
+ sd_global->link_list = xbt_new0(SD_link_t, sd_global->link_count);