[code] Shadow variable and possible memory leak

Open
#218 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
desktop

Research direction

Read src/xviewer-list-store.c around line 381 and lines 413-420, then check the GTK ownership rules relevant to image. Confirm whether the inner variable shadows the earlier one and whether g_object_unref(image) is required. Done means the shadowing and reference-counting behavior are verified and the appropriate correction is made.

Written by the indexing model from the issue text.

Description

I don't know much about GTK, if someone can check this, thanks.

The variable image hides a superior. Also verify the need to call g_object_unref (image)

https://github.com/linuxmint/xviewer/blob/b8cc32f70b96a523ea35bc06166aa672dab84ffa/src/xviewer-list-store.c#L413-L420

Maybe the intention was to use this variable, L381
https://github.com/linuxmint/xviewer/blob/b8cc32f70b96a523ea35bc06166aa672dab84ffa/src/xviewer-list-store.c#L381

Dominant language
C
Stars
92
Forks
47
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linuxmint/xviewer

All issues in linuxmint/xviewer

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.