diff options
| author | Vicent Martà <tanoku@gmail.com> | 2011-09-18 19:46:12 -0700 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2011-09-18 19:46:12 -0700 |
| commit | b3c524d1048af85158296bc6aee4fbf57241a208 (patch) | |
| tree | fdee0385f779352b4a7ff8019dfc13696ed56898 /src/config.c | |
| parent | 2014021b201e3af4c5bf132fbf1bce5fb6148e21 (diff) | |
| parent | 2aae21888133171e970b8f41bb6594b83c89238e (diff) | |
| download | libgit2-b3c524d1048af85158296bc6aee4fbf57241a208.tar.gz | |
Merge pull request #399 from carlosmn/free-null
Add checks for NULL to the config and remote free functions
Diffstat (limited to 'src/config.c')
| -rw-r--r-- | src/config.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index 975e353f2..f233e76fd 100644 --- a/src/config.c +++ b/src/config.c @@ -25,6 +25,9 @@ void git_config_free(git_config *cfg) git_config_file *file; file_internal *internal; + if (cfg == NULL) + return; + for(i = 0; i < cfg->files.length; ++i){ internal = git_vector_get(&cfg->files, i); file = internal->file; |
