Changeset 2496 for neercs


Ignore:
Timestamp:
Jun 28, 2008, 1:26:41 PM (12 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Removed a double-free and a leak. Mozilla, you have been trolled.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/main.c

    r2495 r2496  
    473473    }
    474474
     475
     476    for(i=0; i<screen_list->recurrent_list->count; i++)
     477    {
     478        remove_recurrent(screen_list->recurrent_list, i);
     479        i = 0;
     480    }
     481
     482    if(screen_list->recurrent_list->recurrent) free(screen_list->recurrent_list->recurrent);
     483    if(screen_list->recurrent_list)            free(screen_list->recurrent_list);
     484
     485    if(screen_list->session_name)
     486        free(screen_list->session_name);
     487
    475488    if(screen_list)
    476489        free(screen_list);
    477 
    478     for(i=0; i<screen_list->recurrent_list->count; i++)
    479     {
    480         remove_recurrent(screen_list->recurrent_list, i);
    481         i = 0;
    482     }
    483 
    484     if(screen_list->recurrent_list->recurrent) free(screen_list->recurrent_list->recurrent);
    485     if(screen_list->recurrent_list)            free(screen_list->recurrent_list);
    486490
    487491    return mainret;
Note: See TracChangeset for help on using the changeset viewer.