From: Chen Gang Date: Sat, 1 Mar 2014 17:34:10 +0000 (+0800) Subject: hw/9pfs/virtio-9p-local.c: move v9fs_string_free() to below "err_out:" X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=75b7931ec63577acb2dd472eb8d772012f1a4807;p=qemu.git 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 --- 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; }