summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDaniel P. Berrange2016-08-11 19:11:04 +0200
committerDaniel P. Berrange2017-01-23 16:32:18 +0100
commit937470bb5470825e781ae50e92ff973a6b54d80f (patch)
treeed7f4e397e7eaf753f2b0e26256ef5e899c17990 /include
parentsockets: add ability to disable DNS resolution for InetSocketAddress (diff)
downloadqemu-937470bb5470825e781ae50e92ff973a6b54d80f.tar.gz
qemu-937470bb5470825e781ae50e92ff973a6b54d80f.tar.xz
qemu-937470bb5470825e781ae50e92ff973a6b54d80f.zip
io: stop incrementing reference in qio_task_get_source
Incrementing the reference in qio_task_get_source is not necessary, since we're not running concurrently with any other code touching the QIOTask. This minimizes chances of further memory leaks. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/io/task.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/io/task.h b/include/io/task.h
index 42028cb424..c268eb0b82 100644
--- a/include/io/task.h
+++ b/include/io/task.h
@@ -244,9 +244,10 @@ void qio_task_abort(QIOTask *task,
* @task: the task struct
*
* Get the source object associated with the background
- * task. This returns a new reference to the object,
- * which the caller must released with object_unref()
- * when no longer required.
+ * task. The caller does not own a reference on the
+ * returned Object, and so should call object_ref()
+ * if it wants to keep the object pointer outside the
+ * lifetime of the QIOTask object.
*
* Returns: the source object
*/