aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/tag.c b/src/tag.c
index 8ac070614..23355c725 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -115,7 +115,7 @@ void tag_lib_init(void)
s++;
}
- free(temp);
+ g_free(temp);
}
struct tag *tag_ape_load(const char *file)
@@ -234,8 +234,7 @@ struct tag *tag_ape_load(const char *file)
fail:
if (fp)
fclose(fp);
- if (buffer)
- free(buffer);
+ g_free(buffer);
return ret;
}
@@ -265,7 +264,7 @@ static void deleteItem(struct tag *tag, int idx)
if (tag->numOfItems > 0) {
tag->items = g_realloc(tag->items, items_size(tag));
} else {
- free(tag->items);
+ g_free(tag->items);
tag->items = NULL;
}
}
@@ -297,11 +296,10 @@ void tag_free(struct tag *tag)
assert(bulk.busy);
bulk.busy = 0;
#endif
- } else if (tag->items) {
- free(tag->items);
- }
+ } else
+ g_free(tag->items);
- free(tag);
+ g_free(tag);
}
struct tag *tag_dup(const struct tag *tag)