From 75b7931ec63577acb2dd472eb8d772012f1a4807 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Sun, 2 Mar 2014 01:34:10 +0800 Subject: hw/9pfs/virtio-9p-local.c: move v9fs_string_free() to below "err_out:" When "goto err_out", 'v9fs_string' already was allocated, so still need free 'v9fs_string' before return. Signed-off-by: Chen Gang Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p-local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/9pfs') diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c index df0dbffa7a..62e694370f 100644 --- a/hw/9pfs/virtio-9p-local.c +++ b/hw/9pfs/virtio-9p-local.c @@ -1059,9 +1059,9 @@ static int local_unlinkat(FsContext *ctx, V9fsPath *dir, } /* Remove the name finally */ ret = remove(rpath(ctx, fullname.data, buffer)); - v9fs_string_free(&fullname); err_out: + v9fs_string_free(&fullname); return ret; } -- cgit v1.2.1