From bbd3ca9b5395857edc383f406b0f64aba190f936 Mon Sep 17 00:00:00 2001 From: Nagendra Tomar Date: Sat, 23 Mar 2024 07:16:09 +0000 Subject: [PATCH] Free write buffer after write completes. --- examples/nfs-writefile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/nfs-writefile.c b/examples/nfs-writefile.c index 09350f93..141099cf 100644 --- a/examples/nfs-writefile.c +++ b/examples/nfs-writefile.c @@ -115,6 +115,8 @@ nfs_write_cb(int status, struct nfs_context *nfs, void *data, struct write_data *wdata = private_data; struct write_file_context *ctx = wdata->ctx; + free(wdata); + if (status < 0) { printf("write call failed with \"%s\"\n", (char *)data); ctx->status = -1;