diff mbox

[for-2.8] nfs: Fix memory leak in nfs_file_create()

Message ID 1478511089-8210-1-git-send-email-kwolf@redhat.com
State New
Headers show

Commit Message

Kevin Wolf Nov. 7, 2016, 9:31 a.m. UTC
The leak was introduced in commit 94d6a7a7.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/nfs.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stefan Hajnoczi Nov. 7, 2016, 1:36 p.m. UTC | #1
On Mon, Nov 07, 2016 at 10:31:29AM +0100, Kevin Wolf wrote:
> The leak was introduced in commit 94d6a7a7.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  block/nfs.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff mbox

Patch

diff --git a/block/nfs.c b/block/nfs.c
index 55c4e0b..d082783 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -676,6 +676,7 @@  static int nfs_file_create(const char *url, QemuOpts *opts, Error **errp)
     ret = nfs_ftruncate(client->context, client->fh, total_size);
     nfs_client_close(client);
 out:
+    QDECREF(options);
     g_free(client);
     return ret;
 }