summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-09-10 22:49:58 +0000
committerDavid Robillard <d@drobilla.net>2015-09-10 22:49:58 +0000
commit91dec7da7f26ad983def896b03cb0a2bc6290c9c (patch)
tree75b765bbc43a8ff7611b1067b0c720d905247dc3
parentd3fff833545e4c912e8c5517818f9f6f225c0df8 (diff)
downloadlilv-91dec7da7f26ad983def896b03cb0a2bc6290c9c.tar.gz
lilv-91dec7da7f26ad983def896b03cb0a2bc6290c9c.tar.bz2
lilv-91dec7da7f26ad983def896b03cb0a2bc6290c9c.zip
Use lilv_free() where appropriate.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5721 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/instance.c6
-rw-r--r--src/lib.c8
-rw-r--r--src/state.c6
3 files changed, 10 insertions, 10 deletions
diff --git a/src/instance.c b/src/instance.c
index 80bbb99..66f5d13 100644
--- a/src/instance.c
+++ b/src/instance.c
@@ -38,7 +38,7 @@ lilv_plugin_instantiate(const LilvPlugin* plugin,
LilvLib* lib = lilv_lib_open(plugin->world, lib_uri, bundle_path, features);
if (!lib) {
- free(bundle_path);
+ lilv_free(bundle_path);
return NULL;
}
@@ -47,7 +47,7 @@ lilv_plugin_instantiate(const LilvPlugin* plugin,
SerdURI base_uri;
if (serd_uri_parse((const uint8_t*)bundle_uri_str, &base_uri)) {
lilv_lib_close(lib);
- free(bundle_path);
+ lilv_free(bundle_path);
return NULL;
}
@@ -95,7 +95,7 @@ lilv_plugin_instantiate(const LilvPlugin* plugin,
}
free(local_features);
- free(bundle_path);
+ lilv_free(bundle_path);
if (result) {
// Failed to instantiate
diff --git a/src/lib.c b/src/lib.c
index ddf3d8e..77d3d22 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -42,7 +42,7 @@ lilv_lib_open(LilvWorld* world,
void* lib = dlopen(lib_path, RTLD_NOW);
if (!lib) {
LILV_ERRORF("Failed to open library %s (%s)\n", lib_path, dlerror());
- free(lib_path);
+ lilv_free(lib_path);
return NULL;
}
@@ -57,17 +57,17 @@ lilv_lib_open(LilvWorld* world,
desc = ldf(bundle_path, features);
if (!desc) {
LILV_ERRORF("Call to `lv2_lib_descriptor' in %s failed\n", lib_path);
- free(lib_path);
+ lilv_free(lib_path);
return NULL;
}
} else if (!df) {
LILV_ERRORF("No `lv2_descriptor' or `lv2_lib_descriptor' in %s\n",
lib_path);
dlclose(lib);
- free(lib_path);
+ lilv_free(lib_path);
return NULL;
}
- free(lib_path);
+ lilv_free(lib_path);
LilvLib* llib = (LilvLib*)malloc(sizeof(LilvLib));
llib->world = world;
diff --git a/src/state.c b/src/state.c
index 79199e4..a29581a 100644
--- a/src/state.c
+++ b/src/state.c
@@ -1117,7 +1117,7 @@ lilv_state_delete(LilvWorld* world,
if (unlink(file_path)) {
LILV_ERRORF("Failed to remove %s (%s)\n", file_path, strerror(errno));
}
- free(file_path);
+ lilv_free(file_path);
}
// Remove any existing manifest entries for this state
@@ -1140,14 +1140,14 @@ lilv_state_delete(LilvWorld* world,
LILV_ERRORF("Failed to remove %s (%s)\n",
dir_path, strerror(errno));
}
- free(dir_path);
+ lilv_free(dir_path);
} else {
// Still something in the manifest, reload bundle
lilv_world_load_bundle(world, bundle);
}
sord_free(model);
- free(manifest_path);
+ lilv_free(manifest_path);
lilv_node_free(manifest);
lilv_node_free(bundle);