| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,6 +26,10 @@ static int config_get(git_config *cfg, const char *key) | |||
| 26 | 26 | } | |
| 27 | 27 | ||
| 28 | 28 | puts(entry->value); | |
| 29 | + | ||
| 30 | + /* Free the git_config_entry after use with `git_config_entry_free()`. */ | ||
| 31 | + git_config_entry_free(entry); | ||
| 32 | + | ||
| 29 | 33 | return 0; | |
| 30 | 34 | } | |
| 31 | 35 | ||
@@ -57,6 +61,11 @@ int lg2_config(git_repository *repo, int argc, char **argv) | |||
| 57 | 61 | error = 1; | |
| 58 | 62 | } | |
| 59 | 63 | ||
| 64 | + /** | ||
| 65 | + * The configuration file must be freed once it's no longer | ||
| 66 | + * being used by the user. | ||
| 67 | + */ | ||
| 68 | + git_config_free(cfg); | ||
| 60 | 69 | out: | |
| 61 | 70 | return error; | |
| 62 | 71 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments