Changeset 3526

Show
Ignore:
Timestamp:
08/13/08 20:28:57 (4 months ago)
Author:
dgollub
Message:

Free Commands once osyncplugin is through all commands...
Fixes also GCC warning about unused fucntion.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tools/osyncplugin.c

    r3520 r3526  
    12141214 
    12151215 
    1216         /* TODO: free command list - for easier memory leak checking */ 
    12171216success: 
    12181217        if (plugin_env) 
    12191218                osync_plugin_env_free(plugin_env); 
     1219 
     1220        for (o=cmdlist; o; o = o->next) { 
     1221                Command *cmd = o->data; 
     1222                free_command(&cmd); 
     1223        } 
     1224 
    12201225 
    12211226        return EXIT_SUCCESS; 
     
    12291234        if (plugin_env) 
    12301235                osync_plugin_env_free(plugin_env); 
     1236 
     1237        for (o=cmdlist; o; o = o->next) { 
     1238                Command *cmd = o->data; 
     1239                free_command(&cmd); 
     1240        } 
     1241 
    12311242error:   
    12321243        fprintf(stderr, "Error: %s\n", osync_error_print(&error));