This website works better with JavaScript.
Home
Help
Sign In
tmeissner
/
learning-by-doing
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
fixed memory leak by adding free of in->pair array in dictionary_free()
master
T. Meissner
10 years ago
parent
95af873851
commit
290f6bbe4e
1 changed files
with
1 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-0
21st_century_c/chapter11/dict.c
+ 1
- 0
21st_century_c/chapter11/dict.c
View File
@ -78,6 +78,7 @@ void dictionary_free(dictionary *in) {
for
(
size_t
i
=
0
;
i
<
in
-
>
length
;
i
+
+
)
{
keyval_free
(
in
-
>
pairs
[
i
]
)
;
}
free
(
in
-
>
pairs
)
;
free
(
in
)
;
}
Write
Preview
Loading…
Cancel
Save