Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
c49c69d6
Commit
c49c69d6
authored
Jul 18, 2011
by
Jonathan Neuschäfer
Committed by
Max Kellermann
Jul 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: add missing fclose in error path
This patch seems a bit ugly, maybe it would be a bit cleaner with gotos.
parent
d5684f74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
conf.c
src/conf.c
+10
-1
No files found.
src/conf.c
View file @
c49c69d6
...
...
@@ -367,6 +367,7 @@ config_read_file(const char *file, GError **error_r)
assert
(
*
line
!=
0
);
g_propagate_prefixed_error
(
error_r
,
error
,
"line %i: "
,
count
);
fclose
(
fp
);
return
false
;
}
...
...
@@ -378,6 +379,7 @@ config_read_file(const char *file, GError **error_r)
g_set_error
(
error_r
,
config_quark
(),
0
,
"unrecognized parameter in config file at "
"line %i: %s
\n
"
,
count
,
name
);
fclose
(
fp
);
return
false
;
}
...
...
@@ -387,6 +389,7 @@ config_read_file(const char *file, GError **error_r)
"config parameter
\"
%s
\"
is first defined "
"on line %i and redefined on line %i
\n
"
,
name
,
param
->
line
,
count
);
fclose
(
fp
);
return
false
;
}
...
...
@@ -398,6 +401,7 @@ config_read_file(const char *file, GError **error_r)
if
(
*
line
!=
'{'
)
{
g_set_error
(
error_r
,
config_quark
(),
0
,
"line %i: '{' expected"
,
count
);
fclose
(
fp
);
return
false
;
}
...
...
@@ -406,12 +410,15 @@ config_read_file(const char *file, GError **error_r)
g_set_error
(
error_r
,
config_quark
(),
0
,
"line %i: Unknown tokens after '{'"
,
count
);
fclose
(
fp
);
return
false
;
}
param
=
config_read_block
(
fp
,
&
count
,
string
,
error_r
);
if
(
param
==
NULL
)
if
(
param
==
NULL
)
{
fclose
(
fp
);
return
false
;
}
}
else
{
/* a string value */
...
...
@@ -428,6 +435,7 @@ config_read_file(const char *file, GError **error_r)
g_error_free
(
error
);
}
fclose
(
fp
);
return
false
;
}
...
...
@@ -435,6 +443,7 @@ config_read_file(const char *file, GError **error_r)
g_set_error
(
error_r
,
config_quark
(),
0
,
"line %i: Unknown tokens after value"
,
count
);
fclose
(
fp
);
return
false
;
}
...
...
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