diff options
author | David Robillard <d@drobilla.net> | 2020-08-16 13:01:53 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-16 13:56:40 +0200 |
commit | bb1a00aac2e2315a88ef0274455e510afa79ea95 (patch) | |
tree | f7c68d1271ba36c21830c1106dced71fdd51d5e2 /src/env.c | |
parent | fc81e2734ccc293f9d2755b700e8b437ee624560 (diff) | |
download | serd-bb1a00aac2e2315a88ef0274455e510afa79ea95.tar.gz serd-bb1a00aac2e2315a88ef0274455e510afa79ea95.tar.bz2 serd-bb1a00aac2e2315a88ef0274455e510afa79ea95.zip |
Ensure that all free methods tolerate NULL
Diffstat (limited to 'src/env.c')
-rw-r--r-- | src/env.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -47,6 +47,10 @@ serd_env_new(const SerdNode* base_uri) void serd_env_free(SerdEnv* env) { + if (!env) { + return; + } + for (size_t i = 0; i < env->n_prefixes; ++i) { serd_node_free(&env->prefixes[i].name); serd_node_free(&env->prefixes[i].uri); |