Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 852
    • Issues 852
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 42
    • Merge requests 42
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • GLib
  • Merge requests
  • !2808

gsocketclient: Fix passing NULL to g_task_get_cancellable()

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Philip Withnall requested to merge pwithnall/glib:2687-socket-cancellable into main Jul 12, 2022
  • Overview 7
  • Commits 1
  • Pipelines 1
  • Changes 1

Fix a regression from commit abddb42d, where it could pass NULL to g_task_get_cancellable(), triggering a critical warning. This could happen because the lifetime of data->task is not as long as the lifetime of the ConnectionAttempt, but the code assumed it was.

Fix the problem by keeping a strong ref to that GCancellable around until the ConnectionAttempt is finished being destroyed.

Signed-off-by: Philip Withnall pwithnall@endlessos.org

Fixes: #2687 (closed)

Closes #2687 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 2687-socket-cancellable