Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
ec0e0ee4
Commit
ec0e0ee4
authored
May 04, 2021
by
Rob Swindell
💬
Browse files
Fix a couple of resource leaks in iniSortSections()
One in an error path (CID 331353), the other not.
parent
97650f46
Pipeline
#2119
passed with stage
in 12 minutes and 1 second
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/xpdev/ini_file.c
src/xpdev/ini_file.c
+2
-0
No files found.
src/xpdev/ini_file.c
View file @
ec0e0ee4
...
...
@@ -462,6 +462,7 @@ BOOL iniSortSections(str_list_t* list, BOOL sort_keys)
new_list
=
strListInit
();
if
(
new_list
==
NULL
)
{
strListFree
(
&
section_list
);
strListFree
(
&
root_keys
);
return
FALSE
;
}
strListAppendList
(
&
new_list
,
root_keys
);
...
...
@@ -473,6 +474,7 @@ BOOL iniSortSections(str_list_t* list, BOOL sort_keys)
iniAppendSectionWithKeys
(
&
new_list
,
section_list
[
i
],
keys
,
/* ini_style_t */
NULL
);
strListFree
(
&
keys
);
}
strListFree
(
&
section_list
);
strListFree
(
list
);
*
list
=
new_list
;
return
TRUE
;
...
...
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