diff options
| author | Kamil Cukrowski <[email protected]> | 2021-08-21 02:27:43 +0200 |
|---|---|---|
| committer | Kamil Cukrowski <[email protected]> | 2021-08-21 02:27:43 +0200 |
| commit | 153bd3d701f69991e3f03943df1344cd8b65e59b (patch) | |
| tree | 50d7a99a224ae980b7d964ad2de426362550667c /examples | |
| parent | 4a930f5e5f84d3be80cdd96383ef0525f8012a42 (diff) | |
| download | STC-modified-153bd3d701f69991e3f03943df1344cd8b65e59b.tar.gz STC-modified-153bd3d701f69991e3f03943df1344cd8b65e59b.zip | |
Fix memory leaks
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/birthday.c | 3 | ||||
| -rw-r--r-- | examples/bits.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/examples/birthday.c b/examples/birthday.c index 0dbb544a..b3800f70 100644 --- a/examples/birthday.c +++ b/examples/birthday.c @@ -23,6 +23,7 @@ static void test_repeats(void) int v = cmap_ic_emplace(&m, k, 0).ref->second += 1;
if (v > 1) printf("repeated value %llx (%d) at 2^%d\n", k, v, (int) log2(i));
}
+ cmap_ic_del(&m);
}
@@ -56,4 +57,4 @@ int main() seed = time(NULL);
test_distribution();
test_repeats();
-}
\ No newline at end of file +}
diff --git a/examples/bits.c b/examples/bits.c index 84bdbb6b..d8c6f762 100644 --- a/examples/bits.c +++ b/examples/bits.c @@ -9,6 +9,7 @@ int main() char buf[256];
cbits_to_str(s1, buf, 0, -1);
printf("buf: %s: %zu\n", buf, cbits_count(s1));
+ cbits_del(&s1);
cbits_reset(&set, 9);
cbits_resize(&set, 43, false);
@@ -58,4 +59,4 @@ int main() puts("");
}
}
-}
\ No newline at end of file +}
|
