diff options
author | David Robillard <d@drobilla.net> | 2018-01-06 16:05:42 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-07-22 12:47:44 +0200 |
commit | 2fddc28b430ede69e44dcd69e3692993a7c1d161 (patch) | |
tree | 309fa87c7fb0adb5ea4b1e049a58ed9d1a40efc3 /src | |
parent | 88ac6c757f5a40a604c14775cf11552fa657f0ad (diff) | |
download | serd-2fddc28b430ede69e44dcd69e3692993a7c1d161.tar.gz serd-2fddc28b430ede69e44dcd69e3692993a7c1d161.tar.bz2 serd-2fddc28b430ede69e44dcd69e3692993a7c1d161.zip |
Add serd_free for freeing memory allocated by serd
Diffstat (limited to 'src')
-rw-r--r-- | src/reader.c | 2 | ||||
-rw-r--r-- | src/string.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/reader.c b/src/reader.c index c9b00f66..f37eac14 100644 --- a/src/reader.c +++ b/src/reader.c @@ -264,7 +264,7 @@ serd_reader_read_file(SerdReader* reader, FILE* fd = serd_fopen((const char*)path, "rb"); if (!fd) { - free(path); + serd_free(path); return SERD_ERR_UNKNOWN; } diff --git a/src/string.c b/src/string.c index d49e1e68..2f79f496 100644 --- a/src/string.c +++ b/src/string.c @@ -18,6 +18,12 @@ #include <math.h> +void +serd_free(void* ptr) +{ + free(ptr); +} + const uint8_t* serd_strerror(SerdStatus status) { |