On 05/08/2013 09:31 AM, Laszlo Ersek wrote: > We shouldn't allow guest filesystem pollution on error paths. > > Suggested-by: Eric Blake <[email protected]> > Signed-off-by: Laszlo Ersek <[email protected]> > --- > qga/commands-posix.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-)
Reviewed-by: Eric Blake <[email protected]> > > diff --git a/qga/commands-posix.c b/qga/commands-posix.c > index 2eec712..e199738 100644 > --- a/qga/commands-posix.c > +++ b/qga/commands-posix.c > @@ -355,6 +355,9 @@ safe_open_or_create(const char *path, const char *mode, > Error **err) > } > > close(fd); > + if (oflag & O_CREAT) { > + unlink(path); > + } > } > } > > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
