Changeset 1786

Show
Ignore:
Timestamp:
02/21/07 03:37:27 (22 months ago)
Author:
abaumann
Message:

fix attempted freeing of NULL hashtable that can occur if an error
happens before the hashtable is loaded

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/file-sync/src/file_sync.c

    r1752 r1786  
    193193        OSyncFileDir *dir = osync_objtype_sink_get_userdata(sink); 
    194194         
    195         osync_hashtable_free(dir->hashtable); 
    196         dir->hashtable = NULL; 
     195        if (dir->hashtable) { 
     196                osync_hashtable_free(dir->hashtable); 
     197                dir->hashtable = NULL; 
     198        } 
    197199         
    198200        osync_context_report_success(ctx);