aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils
diff options
context:
space:
mode:
Diffstat (limited to 'package/utils')
-rw-r--r--package/utils/otrx/src/otrx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/utils/otrx/src/otrx.c b/package/utils/otrx/src/otrx.c
index 0d99cd39e3..223e032f2b 100644
--- a/package/utils/otrx/src/otrx.c
+++ b/package/utils/otrx/src/otrx.c
@@ -264,9 +264,12 @@ static ssize_t otrx_create_append_zeros(FILE *trx, size_t length) {
if (fwrite(buf, 1, length, trx) != length) {
fprintf(stderr, "Couldn't write %zu B to %s\n", length, trx_path);
+ free(buf);
return -EIO;
}
+ free(buf);
+
return length;
}