diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-10-17 16:17:51 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-10-17 16:17:51 +0100 |
commit | 0975b8b823a888d474fa33821dfe84e6904db197 (patch) | |
tree | 86b05f64864c8a66f6f981548d71353f9f2d81d9 /fsdev | |
parent | 7bf59dfec4234e75e31b3f397374cb5bab1a5b2c (diff) | |
parent | fdfcc9aeea1492f4b819a24c94dfb678145b1bf9 (diff) | |
download | qemu-0975b8b823a888d474fa33821dfe84e6904db197.zip qemu-0975b8b823a888d474fa33821dfe84e6904db197.tar.gz qemu-0975b8b823a888d474fa33821dfe84e6904db197.tar.bz2 |
Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging
This pull request contains:
- a patch to add a vdc->reset() handler to virtio-9p
- a bunch of patches to fix various memory leaks (thanks to Li Qiang)
- some code cleanups for 9pfs
# gpg: Signature made Mon 17 Oct 2016 16:01:46 BST
# gpg: using DSA key 0x02FC3AEB0101DBC2
# gpg: Good signature from "Greg Kurz <groug@kaod.org>"
# gpg: aka "Greg Kurz <groug@free.fr>"
# gpg: aka "Greg Kurz <gkurz@fr.ibm.com>"
# gpg: aka "Greg Kurz <gkurz@linux.vnet.ibm.com>"
# gpg: aka "Gregory Kurz (Groug) <groug@free.fr>"
# gpg: aka "Gregory Kurz (Cimai Technology) <gkurz@cimai.com>"
# gpg: aka "Gregory Kurz (Meiosys Technology) <gkurz@meiosys.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 2BD4 3B44 535E C0A7 9894 DBA2 02FC 3AEB 0101 DBC2
* remotes/gkurz/tags/for-upstream:
9pfs: fix memory leak in v9fs_write
9pfs: fix memory leak in v9fs_link
9pfs: fix memory leak in v9fs_xattrcreate
9pfs: fix information leak in xattr read
virtio-9p: add reset handler
9pfs: only free completed request if not flushed
9pfs: drop useless check in pdu_free()
9pfs: use coroutine_fn annotation in hw/9pfs/9p.[ch]
9pfs: use coroutine_fn annotation in hw/9pfs/co*.[ch]
9pfs: fsdev: drop useless extern annotation for functions
9pfs: fix potential host memory leak in v9fs_read
9pfs: allocate space for guest originated empty strings
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'fsdev')
-rw-r--r-- | fsdev/9p-iov-marshal.c | 2 | ||||
-rw-r--r-- | fsdev/9p-marshal.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/fsdev/9p-iov-marshal.c b/fsdev/9p-iov-marshal.c index 663cad5..1d16f8d 100644 --- a/fsdev/9p-iov-marshal.c +++ b/fsdev/9p-iov-marshal.c @@ -125,7 +125,7 @@ ssize_t v9fs_iov_vunmarshal(struct iovec *out_sg, int out_num, size_t offset, str->data = g_malloc(str->size + 1); copied = v9fs_unpack(str->data, out_sg, out_num, offset, str->size); - if (copied > 0) { + if (copied >= 0) { str->data[str->size] = 0; } else { v9fs_string_free(str); diff --git a/fsdev/9p-marshal.h b/fsdev/9p-marshal.h index 77f7fef..c8823d8 100644 --- a/fsdev/9p-marshal.h +++ b/fsdev/9p-marshal.h @@ -76,8 +76,8 @@ static inline void v9fs_string_init(V9fsString *str) str->data = NULL; str->size = 0; } -extern void v9fs_string_free(V9fsString *str); -extern void v9fs_string_sprintf(V9fsString *str, const char *fmt, ...); -extern void v9fs_string_copy(V9fsString *lhs, V9fsString *rhs); +void v9fs_string_free(V9fsString *str); +void v9fs_string_sprintf(V9fsString *str, const char *fmt, ...); +void v9fs_string_copy(V9fsString *lhs, V9fsString *rhs); #endif |