diff options
author | Max Kellermann <max@duempel.org> | 2009-01-25 18:47:21 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-25 18:47:21 +0100 |
commit | a45922cd66cf8a7a03905c020e50ab01dc05cfa9 (patch) | |
tree | 2171f4d74886b9d049eafe14dc2b1ce72036c912 /src/update.c | |
parent | 7960ad32fcfb1e17c24d3b26e53a1cdbc5ca0028 (diff) | |
download | mpd-a45922cd66cf8a7a03905c020e50ab01dc05cfa9.tar.gz mpd-a45922cd66cf8a7a03905c020e50ab01dc05cfa9.tar.xz mpd-a45922cd66cf8a7a03905c020e50ab01dc05cfa9.zip |
use g_free() instead of free()
On some platforms, g_free() must be used for memory allocated by
GLib. This patch intends to correct a lot of occurrences, but is
probably not complete.
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/update.c b/src/update.c index 4316dd727..c8e328403 100644 --- a/src/update.c +++ b/src/update.c @@ -618,7 +618,7 @@ addParentPathToDB(const char *utf8path) *slash++ = '/'; } - free(duplicated); + g_free(duplicated); return directory; } @@ -647,7 +647,7 @@ static void * update_task(void *_path) { if (_path != NULL && !isRootDirectory(_path)) { updatePath((char *)_path); - free(_path); + g_free(_path); } else { struct directory *directory = db_get_root(); struct stat st; @@ -691,8 +691,7 @@ directory_update_init(char *path) unsigned next_task_id; if (update_paths_nr == G_N_ELEMENTS(update_paths)) { - if (path) - free(path); + g_free(path); return 0; } |