summaryrefslogtreecommitdiff
path: root/src/tools/operf/operf_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/operf/operf_client.c')
-rw-r--r--src/tools/operf/operf_client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/operf/operf_client.c b/src/tools/operf/operf_client.c
index 1518bdf5..d299e239 100644
--- a/src/tools/operf/operf_client.c
+++ b/src/tools/operf/operf_client.c
@@ -100,8 +100,10 @@ void * writer(void * o)
if (buf == NULL)
return (void *) -ENOMEM;
- if (fdp == NULL)
+ if (fdp == NULL) {
+ free(buf);
return (void *) -EINVAL;
+ }
memset(buf, 0, client.size);