Message ID | 147394945209.684.4617472235895650336.stgit@bahia (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 09/15/2016 04:24 PM, Greg Kurz wrote: > This double free did not cause harm because v9fs_string_free() sets > str->data to NULL and g_free(NULL) is valid. > > Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> > --- > hw/9pfs/9p-proxy.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/9pfs/9p-proxy.c b/hw/9pfs/9p-proxy.c > index 52bbf4f1b37c..d091564b6fd2 100644 > --- a/hw/9pfs/9p-proxy.c > +++ b/hw/9pfs/9p-proxy.c > @@ -775,11 +775,10 @@ static int proxy_mkdir(FsContext *fs_ctx, V9fsPath *dir_path, > v9fs_string_free(&fullname); > if (retval < 0) { > errno = -retval; > retval = -1; > } > - v9fs_string_free(&fullname); > return retval; > } > > static int proxy_fstat(FsContext *fs_ctx, int fid_type, > V9fsFidOpenState *fs, struct stat *stbuf) > >
diff --git a/hw/9pfs/9p-proxy.c b/hw/9pfs/9p-proxy.c index 52bbf4f1b37c..d091564b6fd2 100644 --- a/hw/9pfs/9p-proxy.c +++ b/hw/9pfs/9p-proxy.c @@ -775,11 +775,10 @@ static int proxy_mkdir(FsContext *fs_ctx, V9fsPath *dir_path, v9fs_string_free(&fullname); if (retval < 0) { errno = -retval; retval = -1; } - v9fs_string_free(&fullname); return retval; } static int proxy_fstat(FsContext *fs_ctx, int fid_type, V9fsFidOpenState *fs, struct stat *stbuf)
This double free did not cause harm because v9fs_string_free() sets str->data to NULL and g_free(NULL) is valid. Signed-off-by: Greg Kurz <groug@kaod.org> --- hw/9pfs/9p-proxy.c | 1 - 1 file changed, 1 deletion(-)