Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
3d23b74a
Commit
3d23b74a
authored
Mar 29, 2011
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Free the config var hash contents in git_config_free
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
parent
238df559
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
src/config.c
+17
-0
No files found.
src/config.c
View file @
3d23b74a
...
...
@@ -35,6 +35,15 @@
***********************/
static
int
config_parse
(
git_config
*
cfg_file
);
static
int
parse_variable
(
git_config
*
cfg
,
const
char
*
section_name
,
const
char
*
line
);
void
git_config_free
(
git_config
*
cfg
);
static
void
cvar_free
(
git_cvar
*
var
)
{
if
(
var
->
type
==
GIT_VAR_STR
)
free
(
var
->
value
.
string
);
free
(
var
);
}
uint32_t
config_table_hash
(
const
void
*
key
,
int
hash_id
)
{
...
...
@@ -101,10 +110,18 @@ int git_config_open(git_config **cfg_out, const char *path)
void
git_config_free
(
git_config
*
cfg
)
{
git_cvar
*
var
;
const
void
*
_unused
;
if
(
cfg
==
NULL
)
return
;
free
(
cfg
->
file_path
);
GIT_HASHTABLE_FOREACH
(
cfg
->
vars
,
_unused
,
var
,
cvar_free
(
var
);
);
git_hashtable_free
(
cfg
->
vars
);
gitfo_free_buf
(
&
cfg
->
reader
.
buffer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment