mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
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>
This commit is contained in:
parent
6979a813f3
commit
937470bb54
5 changed files with 4 additions and 10 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue