Skip to content

Commit

Permalink
Free write buffer after write completes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagendra Tomar committed Mar 23, 2024
1 parent 63750ff commit bbd3ca9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/nfs-writefile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bbd3ca9

Please sign in to comment.