diff --git a/libc3/buf_parse.c b/libc3/buf_parse.c
index b7c2861..f86de4d 100644
--- a/libc3/buf_parse.c
+++ b/libc3/buf_parse.c
@@ -103,9 +103,12 @@ sw buf_parse_array_data (s_buf *buf, s_array *dest)
0)) <= 0) {
warnx("buf_parse_array_data: buf_parse_array_data_rec:"
" %ld", r);
- goto clean;
+ goto restore;
}
*dest = tmp;
+ goto clean;
+ restore:
+ free(tmp.tags);
clean:
free(address);
return r;