diff options
author | Dmitri Pal <dpal@redhat.com> | 2010-12-24 00:18:56 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-01-03 13:51:37 -0500 |
commit | 859df7ddd1bf1f36ce05966482086ecfb6c81e11 (patch) | |
tree | dff93ca4ecbbd1faf491d128c3fbd192162dc345 | |
parent | 06ce5367aa0578b11890db45a9acee3ec4357f58 (diff) | |
download | ding-libs-859df7ddd1bf1f36ce05966482086ecfb6c81e11.tar.gz ding-libs-859df7ddd1bf1f36ce05966482086ecfb6c81e11.tar.xz ding-libs-859df7ddd1bf1f36ce05966482086ecfb6c81e11.zip |
Free newly created value in case of error
The newly created value object was not freed
in case of an error.
Coverity issue 10076.
-rw-r--r-- | ini/ini_parse.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ini/ini_parse.c b/ini/ini_parse.c index 26dc43f..18edc62 100644 --- a/ini/ini_parse.c +++ b/ini/ini_parse.c @@ -405,6 +405,7 @@ static int complete_value_processing(struct parser_obj *po) if (error) { TRACE_ERROR_NUMBER("Failed searching for dup", error); + value_destroy(vo); return error; } @@ -418,6 +419,7 @@ static int complete_value_processing(struct parser_obj *po) sizeof(struct value_obj *)); if (error) { TRACE_ERROR_NUMBER("Failed updating the value", error); + value_destroy(vo); return error; } /* If we failed to update it is better to leak then crash, |