Skip to content

Commit

Permalink
Fastfetch: fix memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Jul 5, 2023
1 parent 948a480 commit 92588e1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/fastfetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ static void optionParseConfigFile(FFinstance* instance, FFdata* data, const char

//Try to load as a relative path

FFstrbuf absolutePath;
FF_STRBUF_AUTO_DESTROY absolutePath;
ffStrbufInitA(&absolutePath, 128);

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

ffStrbufDestroy(&absolutePath);

//File not found

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

0 comments on commit 92588e1

Please sign in to comment.