Skip to content

Commit 92588e1

Browse files
committed
Fastfetch: fix memory leaks
1 parent 948a480 commit 92588e1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/fastfetch.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ static void optionParseConfigFile(FFinstance* instance, FFdata* data, const char
611611

612612
//Try to load as a relative path
613613

614-
FFstrbuf absolutePath;
614+
FF_STRBUF_AUTO_DESTROY absolutePath;
615615
ffStrbufInitA(&absolutePath, 128);
616616

617617
FF_LIST_FOR_EACH(FFstrbuf, path, instance->state.platform.dataDirs)
@@ -627,8 +627,6 @@ static void optionParseConfigFile(FFinstance* instance, FFdata* data, const char
627627
return;
628628
}
629629

630-
ffStrbufDestroy(&absolutePath);
631-
632630
//File not found
633631

634632
fprintf(stderr, "Error: couldn't find config: %s\n", value);

0 commit comments

Comments
 (0)