diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2010-12-12 14:34:59 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2010-12-12 14:34:59 +0100 |
| commit | 1089f1fcf55591dd4b5d47ee963bfe0e24cf9ad5 (patch) | |
| tree | 73d80ec6674e9a625fe5c7f1fcbb30fdcf15d644 /src/job-manager.c | |
| parent | 3e213519e67c3f9665a4eb1635f5ef37d7171809 (diff) | |
| download | cataract-1089f1fcf55591dd4b5d47ee963bfe0e24cf9ad5.tar.xz | |
items: Cleanup
Diffstat (limited to 'src/job-manager.c')
| -rw-r--r-- | src/job-manager.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/job-manager.c b/src/job-manager.c index 87b3425..c4a77e4 100644 --- a/src/job-manager.c +++ b/src/job-manager.c @@ -225,15 +225,14 @@ build_tree (TGallerySetup *setup, } /* Read the index file and fill items array */ - items = g_malloc0 (sizeof (TAlbum)); - items->parent_index = parent_index; - items->parent_item_index = parent_item_index; - if (! parse_album_xml (idx_file, items)) { + items = parse_album_xml (idx_file); + if (! items) { log_error ("error reading index file '%s'\n", idx_file); g_free (idx_file); - free_album_data (items); return FALSE; } + items->parent_index = parent_index; + items->parent_item_index = parent_item_index; /* Check if update is necessary */ dst_album_file = g_strconcat (dst_dir, "/", setup->index_file_name, NULL); |
