summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index e4fd32cc..14971528 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -613,9 +613,12 @@ int flow_alloc(const char * dst_name,
ret = flow_write(fd, data, len);
if (ret < 0) {
flow_dealloc(fd);
+ free(data);
return ret;
}
+ free(data);
+
return fd;
}