Elektrine lite

← Feed

@ska@social.treehouse.systems

2026-09-23 08:17 UTC

path = g_strdup (argv[n]); How many code smells can you detect in that one single line?

Replies (1)

  • using glibusing strdupon an argv element, which will be available for the whole lifetime of the programyou cannot see it here without the full context, but it loops around n while path is defined outside of the loop, so it needs to free on every iteration or it just overwrites path and leaks

    Open ##4818395